Reputation: 49
So I am playing with facebooker2. I already know how to display current user's profile picture when they are logged in. However, I am interested in display the profile pictures of other users on my app as well. I was wondering if anyone knows how to do this? I have asked for offline permission already, but I am not really sure what would be the next step.
Could anyone please give some hints maybe? Thank you very much!
Upvotes: 0
Views: 792
Reputation: 3236
if you need the small avatar, then just do it with the image tag
<%= image_tag "http://graph.facebook.com/#{@user.facebook_id}/picture" %>
Upvotes: 2
Reputation: 2107
If you have facebook uid of user then you can show his picture. You don't need any permission for this.
With facebooker2 you have helper as fb_profile_pic(facebookUserUid, OptionHash)
by this way following code works for me-
<%= fb_profile_pic(current_facebook_profile.id, {:size => 'square' }) %>
For offline users -
<%= fb_profile_pic(user.fb_user_uid, {:size => 'square' }) %>
As i store facebook uid in fb_user_uid column.
Upvotes: 1