我有以下错误。我应该如何捕捉这个错误?
致命错误:未捕获的 OAuthException:验证访问令牌时出错:用户 638720122 未授权应用程序 207445576002891。在第 1039 行的 /var/www/clients/client1/web12/web/socialmediaping/fblibrary/base_facebook.php 中抛出
我有下面的代码片段,我相信我确实尝试管理错误。
// Attempt to query the graph:
$graph_url = "https://graph.facebook.com/me?"
. "access_token=" . $access_token;
$response = curl_get_file_contents($graph_url);
$decoded_response = json_decode($response);
//Check for errors
if ($decoded_response->error) {
$facebookAuth = FALSE;
}
再往下,如果 $facebookAuth == FALSE ,我将用户重定向到 facebook 以进行授权,但这不起作用,那么我该怎么办?
非常感谢您的帮助。