我正在尝试使用 PHP 发布到用户墙上。它不工作。请帮我解决问题。我使用了以下代码。
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$fbcheck= $facebook->getUser();
//op($fbcheck);exit;
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' => 'It is a programming test',
'name' => $details['jobtitle'],
'caption' => "Sunil Kumar",
'link' => $urlParser->job($details['jkey']),
'description' => 'Jobslanda is one of the perfect job sharing system.',
'picture' => 'http://jobslanda.com/job.gif',
'actions' => array(array(
'name' => 'Get Search',
'link' => 'http://www.google.com'
))
);
$result = $facebook->api(
'/me/feed/',
'post',
$attachment
);