自上周四(2012年11月28日)以来,我的Facebook页面标签无效。 在developers.facebook.com中,我设置了“Facebook上的应用程序”和“页面选项卡”。
来源:
$app_id = "XXXXXXXXXXXXXXX";
//$canvas_page = "https://facebook.com/my_facebook_page?sk=app_XXXXXXXXXXXXXXX";
$canvas_page = "http://my-promotion.domain.com";
$application_secret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $application_secret,
'cookie' => true,
));
$auth_url = "https://www.facebook.com/dialog/oauth?client_id=".$app_id."&redirect_uri=".urlencode($canvas_page)."&scope=user_likes,publish_actions";
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
1。如果我将$ canvas_page设置为https://facebook.com/my_facebook_page?sk=app_XXXXXXXXXXXXXXX,当我点击页面标签(在Facebook页面上)时,我会收到错误:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: De opgegeven URL wordt niet toegestaan door de configuratie van de applicatie.
2. 如果我将$ canvas_page设置为Canvas URL(在developer.facebook.com上我的应用程序中声明) - http://my-promotion.domain.com/ - 我将获得Auth Dialog。但在获得许可之后,我得到了一个无限循环:
=“> HTTP://my-promotion.domain.com/代码= AQC_wreWvGJuZQC07I5Kyps79JIeuRv718wWoWYb94A_RlxagWWRQOBQp0xQUAjG6rWAHDrVWEo851udcTC9jWHor980h2ipQ67LLKgYEfvKN71bjMO3y9SzHjiGtpIiCZHd3L6gHgM3Vmzpw3NvpMxXCXIUQtYOsEeOJAOws5rY3IaTCMo5Al-cO5zFPd2K0sHnbXbDo2JAyYTNm5skW-0I# = (?代码的值连续变化)
在28-11-2012之前,如果我将$ canvas_page设置为选项1,那么我的页面选项卡始终有效。