1
雖然試圖在facebook上使用PHP作爲腳本語言在壁紙上發佈貼子,但腳本在經過對facebook的成功驗證後停止。使用的代碼如下所示。請幫助我解決這個問題。面書壁貼不能正常工作
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$fbcheck= $facebook->getUser();
if(is_null($fbcheck) or !$fbcheck or $fbcheck==0)
{
header("Location:{$facebook->getLoginUrl(array('scope' => 'user_status,publish_stream,user_photos,photo_upload'))}");
}
$attachment = array(
'message' => 'Hello friends , try this job :)',
'name' => "Jobslanda - The perfect job information system. ",
'caption' => "My Caption",
'link' => 'google.com',
'description' => 'Jobslanda is one of the perfect job sharing system.',
//'picture' => $urlParser->fbpostpic($input['ik']),
'actions' => array(array(
'name' => 'Get Search',
'link' => 'http://www.google.com'
))
);
$result = $facebook->api(
'/me/feed/',
'post',
$attachment
);
Facebook not face book –