我是 facebook 应用程序的新手,我尝试将代码从 fbml 更改为图形 api,但图形 api 重定向不起作用,它显示 404 页面未找到。我的画布类型是 FBML。如何将画布类型 FBML 更改为 iframe。我的代码是,
<?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"];
}
}
?>
任何人请帮助我...