我无法发布通知。这是我的 PHP 代码:
try {
$id = Fb_Config::get_app_id();
$secret = Fb_Config::get_secret_code();
$url = "https://graph.facebook.com/oauth/access_token?client_id=$id&client_secret=$secret&grant_type=client_credentials";
$appAccessToken = end(explode("=", file_get_contents($url), 2));
var_export(Fb_Facebook::get()->api_post("/".$this->get_logged_in_user()->get_id()."/notifications?access_token=$appAccessToken", array(
href => "http://www.disney.com",
template => "this is awesome"
)));
} catch (Exception $e) {
echo "<pre>Error: ";
echo $e->getMessage();
echo "</pre>";
}
错误是:
错误:(#15) 必须使用应用程序 access_token 调用此方法。