我正在处理我的第一个Fb应用程序。只是用于测试目的,我去了我的帐户设置和删除应用程序,现在我不能访问自己的应用程序,并得到错误:Facebook API:无法授权我自己
API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application.
在PHP中使用下面的代码授权:
$auth_url = "https://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&redirect_uri=" . urlencode($my_url);
$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> top.location.href='" . $auth_url . "'</script>");
} else {
echo ("Welcome User: " . $data["user_id"]);
}
$access_token = $data["oauth_token"];
$user = intval($data["user_id"]);
有一点我想补充一点,如果我访问REDIRECT_URI直接在浏览器上,它显示对话框,授权我的应用程序,但是当我访问我的浏览器应用程序的URL,然后提示错误并重定向到以下网址
https://www.facebook.com/connect/uiserver.php?app_id=363045713726227&method=permissions.request&redirect_uri=https%3A%2F%2Fapps.facebook.com%2F363045713726227%2F&response_type=none&display=page&perms=user_photos&auth_referral=1
$ my_url =“http:// localhost/fb/photos /” – Volatil3 2012-03-13 14:10:52
很酷,就是这样,它需要与Canvas URL:字段中的相同,所以可能http ://本地主机/ FB /照片/。 – GeeH 2012-03-13 14:26:52
已经使用相同的URL,我只是无法看到授权对话框 – Volatil3 2012-03-13 20:56:47