【问题标题】:using Facebook Graph API how can i access friends names使用 Facebook Graph API 如何访问朋友姓名
【发布时间】:2014-08-09 10:10:29
【问题描述】:

我正在做一个项目,该项目需要显示我的 Facebook 帐户的好友列表。当我分配我/朋友时,它会告诉我我帐户中的朋友数量,例如,{

“朋友”:{ “数据”: [ ], “概括”: { “总数”:122 } }, "id": "290538796816510" }

我没有在“数据”中得到任何名称。而另一方面,当我使用“我/朋友列表”时,它只会给我“亲密朋友”、“家人”等列表的名称。 谁能告诉我如何得到我朋友的名字。

【问题讨论】:

  • 我也检查过.. 对我不起作用
  • 请输入您的代码,以便我们提供帮助
  • 我没有使用 fb sdk。我正在使用它的 json
  • SBJSON *jsonparser = [[SBJSON alloc]init]; FbGraphResponse *fb_graph_response = [fbGraph doGraphGet:@"me/friends" withGetVars:nil]; NSString *resultString = [NSString stringWithString:fb_graph_response.htmlResponse]; NSDictionary *firstDictionary = [jsonparser objectWithString:resultString]; NSArray *firstArray = [firstDictonary objectForKey:@"data"];

标签: ios json facebook-graph-api sbjson


【解决方案1】:

在最近的更新中,Facebook 决定不允许应用访问完整的好友列表。 现在一个应用程序只能看到已经在使用该应用程序的朋友,而不是其他人。

这对很多人来说都是个问题,包括我自己,但 Facebook 似乎打算让它像这样工作。 这里有更多信息:

Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app

【讨论】:

  • 好的。非常感谢.. 我将不得不使用 taggablefriends 或 invitablefriends 来访问列表。
  • 没问题!请注意,taggableFriends 需要 facebook 审核,因此您只能将其用于他们的意图(标记图片)。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-04-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多