-1
我有一個腳本發佈到託管頁面,除非我嘗試安排帖子。它未能對Facebook的PHP日程安排 - 錯誤意外的異常
Array ([error] => Array ([message] => An unexpected error has occurred. Please retry your request later. [type] => OAuthException [code] => 2))
我碰到這個Facebook Graph API error when posting scheduled post on Business page來說明它可能是與「鏈接」,但不指定哪個環節一個問題。但我嘗試了所有這些,但仍然得到相同的錯誤。
另一方面的問題....頁面訪問令牌過期了嗎?似乎對這些有些困惑。
foreach($_POST['fb'] as $key=>$code){
$facebookpage= $key;
$facebookaccesstoken= $code;
$newfacebook = new Facebook(array(
'appId' => $appId,
'secret' => $appSecret
));
$time= time();
$newtime= $time +13600;
$attachment=array(
'access_token'=> $facebookaccesstoken,
'published' => false,
'scheduled_publish_time'=> $newtime,
'message'=> "new sasa posting me!",//user message
'name'=> 'Anyone sasa interested in this? Check out my advert!',//title
'link'=> 'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg', // link to advert
'description'=> 'myadvert asa brings the milkshakes',//inner ad
'picture'=>'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg',//picture url if empty= site logo
'actions'=>array(array(
'name'=>'dshjs',
'link'=>'http://testserverdavideec.mx.nf/wp-content/uploads/2014/05/user53734efe383247.67413395boats.jpg'
))
);
$post_url='/'.$facebookpage.'/feed';
try{
$result=$newfacebook->api($post_url,'POST',$attachment);
echo '<h1> result=</h1>'; var_dump($result);
} catch (FacebookApiException $e) {
print_r($e);
}
}