【发布时间】:2014-08-11 18:49:10
【问题描述】:
我在 Koala 中使用 Facebook 的 Graph API 2.0 工作。现在,当您使用
调用 user_friends<% @friends = @graph.get_connections("me", "friends") %>
你应该得到一个包含以下内容的对象:
{
"data": [
{
"name": "Friend 1",
"id": "xxxxx"
},
{
"name": "Friend 2",
"id": "xxxx"
},
],
"paging": {
"next": "https://graph.facebook.com/v2.1/...."
},
"summary": {
"total_count": number of friends
}
}
我的问题是如何从摘要中提取信息。我尝试在我的 ruby 应用程序中打印此内容,但只看到以下内容:
[]
这是否意味着回报为零?我试图打电话给@friends.summary,但没有成功
想法?
【问题讨论】:
标签: ruby-on-rails facebook-graph-api koala