Alex Rivera | Logout

facebook javascript sdk fb_xd_fragment?

Asked 2010-06-02T04:27:54.823
23

I am using the facebook javascript sdk to embed a like button in my page.

What is fb_xd_fragment? I see it appends to the end of my url like http://www.example.com/controller/?fb_xd_fragment, and this is causing some nasty recursive reload of the page.

Edit
Report

1 Answer

0

The Channel hack did not work for me. So I just added above all other content in my PHP file some code that 301 redirects to the URL without the fb_xd_fragment addition:

$url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

if (isset($_GET['fb_xd_fragment'])) {
$url = str_replace("?fb_xd_fragment=","",$url);
header( "HTTP/1.1 301 Moved Permanently" ); 
header("Location: {$url}");
exit();
}
answered 2011-04-05T13:07:17.667

Your Answer