Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 3 使用fb_图提取好友uid_Ruby On Rails 3_Facebook Graph Api_Devise_Omniauth - Fatal编程技术网

Ruby on rails 3 使用fb_图提取好友uid

Ruby on rails 3 使用fb_图提取好友uid,ruby-on-rails-3,facebook-graph-api,devise,omniauth,Ruby On Rails 3,Facebook Graph Api,Devise,Omniauth,有人知道如何使用fb_图提取facebook好友列表吗?我当前的代码如下,但不起作用。我正在使用Desive和omniauth 在我的用户控制器中 def profile profile ||= FbGraph::User.me(self.authentications.find_by_provider('facebook').token).fetch end 在我看来 <% current_user.profile.friends.each do |friend| %> &l

有人知道如何使用fb_图提取facebook好友列表吗?我当前的代码如下,但不起作用。我正在使用Desive和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 %>


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

使用
friend.identifier
而不是
friend.uid