Refreshing FBML Caches
Problem
I need to tell Facebook to refresh its caches for some of my stored data.
Solution
If you’re caching images, use the FBML.refreshImgSrc()
method:
$return = $facebook->api_client->fbml_refreshImgSrc ('http://www.someserver.com/images/some_image.jpg');
If you’re caching URLs, use the FBML.refreshRefUrl()
method:
$return = $facebook->api_client->fbml_refreshRefUrl ('http://www.someserver.com/page.php');
Discussion
This returns true (1
) if
Facebook is able to locate an entry in its cache with the url
you passed in and can refresh, or false
(0
) or blank if it can’t.
Get Facebook Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.