未捕获的OAuthException:发生了未知错误。签名错误的JSON签名

时间:2014-05-09 14:24:19

标签: php facebook sdk

几周前我创建了应用程序,一切都很好。昨天我创建了一个像以前一样的应用程序,在我的代码中更改了appid,秘密,我收到了以下错误:

Fatal error: Uncaught OAuthException: An unknown error has occurred.
thrown in /home/x/ftp/xz/src/base_facebook.php on line 1325

我的代码:

 require 'src/facebook.php';
 require 'config.php';
 $user = $facebook->getUser();

if ($user) {
  try {
    // Proceed knowing you have a logged in user who's authenticated.
    $user_profile = $facebook->api('/me');
    $friends = $facebook->api('/me/friends');
    $usertoken = $facebook->getAccessToken();
  } catch (FacebookApiException $e) {
    error_log($e);
$user = null;
 }
} 
  $ret_obj = $facebook->api('/me/photos', 'POST', array(
                                         'image' => '@' .realpath('generated/'.$filename),
                                         'message' => $post_message,
                                         'tags' => $tagi
                                         )
                                      );

如果我打印_r $facebook我可以看到空

var:      [accessToken:protected] => 

我在apps.facebook.com/xxx

上使用我的应用

0 个答案:

没有答案