iPhone Facebook连接FQL查询以获取用户的朋友

时间:2009-11-07 06:42:58

标签: iphone facebook facebook-fql

我正在尝试使用fb connect for the iphone获取用户朋友的列表。

我已尝试过以下两种FQL查询,但它们似乎没有返回任何内容。

哪一个是正确的?

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

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

1 个答案:

答案 0 :(得分:6)

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

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