【问题标题】:Pull friends uid using fb_graph使用 fb_graph 拉朋友 uid
【发布时间】:2011-07-17 02:08:14
【问题描述】:

有谁知道如何使用 fb_graph 提取 facebook 好友 uid 列表?我当前的代码如下,但它不起作用。我正在使用设计和omniauth。

在我的用户控制器中

def profile
  profile ||= FbGraph::User.me(self.authentications.find_by_provider('facebook').token).fetch
end

在我看来

<% current_user.profile.friends.each do |friend| %>
<%= friend.uid %>
<% end %>

几天来我一直在寻找解决方案,但仍然徒劳无功,如果有人能告诉我线索,我将不胜感激。

【问题讨论】:

    标签: ruby-on-rails-3 facebook-graph-api devise omniauth


    【解决方案1】:

    使用friend.identifier 代替friend.uid

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-10
      • 1970-01-01
      • 1970-01-01
      • 2012-02-12
      • 2015-10-21
      相关资源
      最近更新 更多