small medium large xlarge

Generic-user-small
25 Mar 2010, 15:42
Anant Chaudhary (17 posts)

I am implementing the invite friends mechanism using the multi friend selector and wanted to give the user some feedback after they send the request by showing the pics of friends they invited. The code I have there is:

(where invited is the loop variable from the ids array that I get back) The ids array that I get is definitely not empty, and when I looked at the page source it had valid fb_user_ids present… just nothing on the page! And my page just looks blank :( Any ideas what could be going wrong here?

Head_pragsmall
25 Mar 2010, 17:07
Mike Mangino (543 posts)

you need an fb_profile_pic for each user, with the id in the uid of the fb:profile-pic. Take a look at the facebook documentation: http://wiki.developers.facebook.com/index.php/Fb:profile-pic

Generic-user-small
26 Mar 2010, 01:14
Anant Chaudhary (17 posts)

Yep that is what I have. Here is the code:

<% @invited_ids.each do |invited| %>
 <fb:profile-pic uid=""><%= invited %>” size=”square” facebook-logo=”true” ></fb:profile-pic><br/>
<% end %>

And it shows up a blank page :( What is that I should change?

Head_pragsmall
26 Mar 2010, 12:37
Mike Mangino (543 posts)

Take a look at that again:

`

<fb:profile-pic uid=""><%= invited %>” size=”square” facebook-logo=”true” ></fb:profile-pic>

`

What you want is

`

<fb:profile-pic uid="<%= invited %>” size=”square” facebook-logo=”true” ></fb:profile-pic>

`

or even better

`

 <%= fb_profile_pic invited, :size=>"square", :facebook_logo=>true %>

`

Generic-user-small
26 Mar 2010, 15:30
Anant Chaudhary (17 posts)

Oops! stupid me. Thanks Mike

You must be logged in to comment