简体   繁体   中英

iPhone facebook connect FQL Query to get user's friends

I'm trying to get a list of user's friends using fb connect for the iphone.

I've tried both of the following FQL Queries, but they don't seem to be returning anything.

which one is correct if any ?

NSString* fql = [NSString stringWithFormat:@"select flid,name from friendlist where owner=%lld",[self fbSession].uid]; 

or

NSString* fql = [NSString stringWithFormat:@"SELECT flid,uid FROM friendlist_member WHERE flid IN (SELECT flid FROM friendlist WHERE owner=%lld)",[self fbSession].uid];

啊......想通了......

NSString* fql = [NSString stringWithFormat:@"SELECT name,uid FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1=%lld )",[self fbSession].uid];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM