Using fb:name and fb:profile-pic in IFRAME doesn't work?

Jul 22, 2009 at 8:36 PM

Hello everyone.  Newbie Facebook developer her.  I'm trying to use fb:name and fb:profile-pic within an IFRAME app to display a list of certain Facebook users.  Simple code like this:

 <fb:name uid='00000'></fb:name> 

But all I get back for name is a blank, and all I get for the profile pic is the anonymous silhouette. 

If I wrap everything up in an fb:serverfmbl tag like this, it works fine:

   <fb:serverfbml><script type='text/fbml'><fb:fbml><fb:name uid='00000'></fb:name></fb:fbml></script></fb:serverfbml> 

I'd be happy to just leave it all in a serverfbml, but I'm assuming the first version is the most efficient way to do this.  I know I could use the toolkit's API to get the person's name and a URL to their profile pic but I'm assuming that is the most ineffecient way to do this.  Please correct me if I am wrong!

I'm at my wits on about how to fix this.  I'm not even sure where to start.  Could it have something to do with the cross domain receiver?  I've fiddled with it, and I believe it's working, but how can I test it?  And I don't want to keep fiddling with that if its not really the problem.


Jul 24, 2009 at 6:32 PM

Think I found the answer...  Facebook's code seems to crash if you have surrounded the profilepic or name with an A tag.  Maybe this is documented somewhere and I missed it; might be a security thing.

Jul 24, 2009 at 6:39 PM

Double note -- it only fails if you don't specify linked=false in the tag, and it tries to render it's own link.  Silly me.