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