开发者

iPhone facebook connect FQL Query to get user's friends

开发者 https://www.devze.com 2022-12-10 14:48 出处:网络
I\'m trying to get a list of user\'s friends using fb connect for t开发者_如何学运维he iphone.

I'm trying to get a list of user's friends using fb connect for t开发者_如何学运维he 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];


Ah.. figured it out...

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号