我想检索用户的朋友发布/发布的状态数据。我编写了以下代码,但只获取用户自己的状态更新。有人可以帮忙告诉我我的代码有什么问题吗?谢谢!
NSString *fql = [NSString stringWithFormat:@"select uid,message from status where uid in (select uid2 from friend where uid1=%lld) order by time desc ", uid];
NSDictionary *params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
[[FBRequest requestWithDelegate:self] call:@"facebook.Status.get" params:params];
答案 0 :(得分:1)
您需要更改调用以使用“facebook.fql.query”,因为您正在进行直接查询。
这是我获取最近20位朋友更新的代码:
NSString* fql = [NSString stringWithFormat:
@"SELECT uid, pic_square, name, status FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = %lld) AND status.time > 0 ORDER BY status.time DESC LIMIT 20", fbSession.uid];
NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];
last20FriendsStatusRequest = [FBRequest requestWithDelegate:self];
[last20FriendsStatusRequest call:@"facebook.fql.query" params:params];
致以最诚挚的问候,