Talk:Fbml.refreshImgSrc
From Facebook Developers Wiki
How I got this to work, two scenarios: Static Image URL Use: $facebook->api_client->fbml_refreshImgSrc('http://www.website.com/images/picture.jpg');
URL that contains PHP variable
URL: http://www.website.com/".$variable."/
Had to create new variable with concatenation
New Variable: $imgsrc = "http://www.website.com/".$variable;
Use: $facebook->api_client->fbml_refreshImgSrc($imgsrc);
NOTES
1. Remember to make sure $facebook is defined, I use $fb, and kept trying to use $facebook. 2. In the static url you use single quotes. 3. With the variable, no single quotes. 4. Use either line of code after $facebook->api_client->profile_setFBML();
- Daniel Slade - University of Iowa
Hi everybody!
Call to refreshImgSrc returns "false" in two cases:
1. Image was not in facebook cache. So, nothing to refresh.
2. Image was in cache but facebook failed to refresh it for some reason.
I have a large collection of images (50000), few of them are changed every day. I don't store information which of them are showed on user profiles. So, every day I update about 100 images and I'm not sure which of them are already cached actually. That's why I update all these changed pictures every day.
Thus, I have a question: how to distinguish "false" responses 1 and 2?
Alexander.
[edit] What about inside a profile box?
How would you call this function from within the profile box? I want to set this function as part of my default_fbml ..
Please explain with example. I'm confused!
[edit] Deprecating This Method
NOTE: This is no longer being deprecated.
Remember that this method is being deprecated in the next couple of weeks, as per http://developers.facebook.com/news.php?blog=1&story=74.
Inquiry :
The above article suggests refreshing the cached image url with a new random variable periodically (within a GET parameter) .. can you please specify the period after which the cached image expires since i will need to refresh the swfphoto for each user individually which is hectic and very time consuming .. i dont wanna do this frequently.
by Sherif Ehab
- Has this method been deprecated yet? --535261609 07:02, 24 March 2008 (PDT)
