Apologies in advance for being a somewhat novice site builder. We have had the FB modules running OK on our site. Yesterday, it seems that how Facebook renders its user pictures changed? Previously, FB would return an image that we could style. For example, the standard 50x50 FB user picture worked nicely on our node pages. On teasers, we styled it with our theme to be smaller at 30x30. But now, FB seems to be returning an iFrame, which we cannot apply styles against. (see example Firebug screen shot attached, unfortunately I don't have one of the previous state)
We hadn't made any changes to our site recently; I'm confused how FB would suddenly switch to returning an iFrame, was wondering if anyone else knew anything about this?
Any suggestions on how to style the iFrame FB user picture to shrink it to 30x30?
The only thing I could think of would be to do an override of theme('fb_user_picture') that passes a size parameter specifically for the teasers and use the standard one everywhere else, if that makes any sense?
Thanks to anyone for suggestions and guidance!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | FB User Picture back to normal 2013-04-27 at 10.37.35 copy.png | 136.33 KB | skmoto |
| FB User Picture Firebug Screen Shot 2013-04-25 at 20.58.43.png | 135.49 KB | skmoto |
Comments
Comment #1
Dave Cohen commentedtheme_fb_user_picture() uses
<fb:profile-pic>, which I believe has been doing the iframe all along so I'm not sure why it appears to have changed.You could try
<img src=//graph.facebook.com/$fbu/picture />where $fbu is the facebook id. That's an option which did not exist when theme_fb_user_picture() was first written.Comment #2
skmoto commentedDave, Awesome, thank you very much for the suggestion! That appears it may solve the problem, need to do more testing. Once I've been able to confirm, I'll post up the change.
For what it's worth, just a few days after I posted my original message, Facebook stopped returning an iFrame and reverted back to returning an image. For reference, I'm attaching a Firebug shot of this. But just this morning, it went back to the iFrame! I googled
<fb:profile-pic>some more and it seems those FBML tags are being deprecated -- I wonder if that contributes to the unpredictable behavior?...Comment #3
Dave Cohen commentedHmmm I haven't noticed that iframe vs not iframe thing before. I wonder if it is changing over time, or changing depending on whether you're connected and whose picture you're looking at. When I first started working with facebook, it's javascript SDK was something you could host yourself. That is you could get a copy of a particular version and know that it wouldn't change. That's no longer the case. You have to use the copy they host, and from time to time it's changed in ways that break major things. I think what contributes to the unpredictable behavior is they just don't care.
My goal for modules/fb version 4.x (the next major version) is to not need their javascript SDK at all.
Marking as fixed because I leave to many issues around this queue. Re-open if the /picture workaround doesn't work out.
Comment #5
dlg0 commentedThanks, #1 was just the answer I was looking for!
Comment #6
dlg0 commentedThanks, #1 was just the answer I was looking for!