<%= fb_multi_friend_selector("Invite your friends to check out this site", :showborder => true,:exclude_ids => facebook_session.user.friends_with_this_app.map(&:id).join(","), :condensed => false) %>正如你在上面看到的,:exclude_ids => facebook_session.user.friends_with_this_app.map(&:id).join(","),这一行可以删除你的朋友,并加入了那里列出的应用程序。最近,我升级到了Facebooker2。我如何在Facebooker2中做同样的事情?
在Facebookers和Mogli中没有名为friends_with_this_app的函数。
发布于 2011-08-06 01:39:50
我还没能想出一个一步到位的解决方案。但是,您可以这样做:
<% every_friend = current_facebook_user.friends.map(&:id) %>
# replace user with your class and fb_id with your user's facebook id field name
<% app_friends = User.where( :fb_id => every_friend ).map(&:id) %>然后你的代码
<%= fb_multi_friend_selector("Invite your friends to check out this site", :showborder => true,:exclude_ids => app_friends, :condensed => false) %>https://stackoverflow.com/questions/5247836
复制相似问题