fb:ref is a way to set a placeholder on a bunch of user profiles, and then update it across all those profiles with a single call. It makes sense to use when you have data or images that would need to be updated occasionally, but are not specific to the current viewing user. Some examples would be banner, application news updates, or perhaps an entire theme for a profile box.
You can have multiple fb:ref's - they are keyed off the one of two things:
Below, I will show steps for implementing the callback method:
$fbml = "<fb:ref url='http://yourserver.com/callbackurl' />"; $facebook->api_client->profile_setFBML("", NULL, $fbml, "", "");
on Bebo it would be:
$snml = "<sn:ref url='http://yourserver.com/callbackurl' />"; $bebo->api_client->profile_setSNML($snml , $userid);
For the callback url, you can either use a unique page or just pass a GET parameter that you can check for later like this:
<fb:ref url='http://yourserver.com/yourapp/callbackurl/?refcallback=1' />
if ( isset($_GET['refcallback']) ) { $text = " <div> <img src='http://yourserver.com/yourapp/someimage.jpg'/> </div> "; echo $text; }
$refreshURL = "whatever you used for the sn:ref above"; $facebook->api_client->fbml_refreshRefUrl("$refreshURL");
on Bebo it would be:
$refreshURL = "whatever you used for the sn:ref above"; $bebo->api_client->snml_refreshRefUrl("$refreshURL");