我怎样才能替换“me()” FQL iphone 中的术语
我正在使用 Facebook api 创建一个 iphone 应用程序。在这里,我使用以下查询来获取朋友的详细信息;
NSString* fql1 = [NSString stringWithFormat:@"SELECT uid,pic_square, name,online_presence FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY online_presence"];
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
fql1, @"query",
nil];
[_facebook requestWithMethodName:@"fql.query" andParams:params andHttpMethod: @"POST" andDelegate: self];
在这里,我需要替换术语“me()”以使我的项目运行。那么,我该怎么做呢,我手头有我的(用户)ID、姓名。那么,如果我将术语 me() 替换为用户 ID、用户名,它会起作用吗?如果是,我该怎么做? 请分享您的想法。 谢谢 :)
I am creating an iphone app using Facebook api. Here I'm using the following query to get the friends details;
NSString* fql1 = [NSString stringWithFormat:@"SELECT uid,pic_square, name,online_presence FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) ORDER BY online_presence"];
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
fql1, @"query",
nil];
[_facebook requestWithMethodName:@"fql.query" andParams:params andHttpMethod: @"POST" andDelegate: self];
here, I need to replace the term 'me()' to make my project running. So, how can I do that, I have my (user's) ID, name in hand. So will it work if I replace the term me() with user id, user name. If yes, how can I do that?
Please share your thoughts.
Thanks :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,只需将“me()”替换为您要查找其信息的用户的 uid
Yes, just replace the 'me()' with the uid of the user you're looking for the info of
事实上,您只需将 me() 替换为 uid 即可。
Indeed, you simply replace the me() with the uid.