I am new in facebook application,i am try to change code from fbml to graph api but graph api redirecting not working, it shows 404 page not found.My canvas type is FBML.How can I change canvas type FBML to iframe.
My code is,
<?php function index()
{
$facebook = new Facebook(array(
'appId' => '1670025435555',
'secret' => '682018907e58d7208d9b663d9073op09',
'cookie' => true,
));
$session = $facebook->getSession();
$app_id = "1670025435555";
$canvas_page = "http://apps.facebook.com/englishlanguageclub/";
$auth_url = "http://www.facebook.com/dialog/oauth?client_id=". $app_id . "&redirect_uri=" . urlencode($canvas_page)."&scope=user_about_me,user_hometown,email,read_requests,read_stream,publish_stream,user_birthday,sms";
if(isset($_REQUEST["signed_request"]))
{
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
}
if (empty($data["user_id"]))
{
echo("<script type='text/javascript'> top.location.href='" . $auth_url . "'</script>");
}
else
{
$uid = $data["user_id"];
}
}
?>
Anyone please help me…
You have to change the canvas type from the Facebook app settings. You need to login in developer.facebook.com and then go to your App and then Edit the settings.