O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required