我有一个Facebook应用程序,可以发布(消息,链接,图像)到用户墙
当我看到用户墙或主页时,标语(通过状态appname)没有出现
这是代码:
// in case of image
$image = "image url"
$attachment = array(
'message' => $message,
'source' => $image,
'url' => $image
);
$photo = true;
// in case of youtube link
$attachment = array(
'message' => $message,
'link' => 'http://www.youtube.com/watch?v=' . $video_id,
'source' => 'http://www.youtube.com/v/' . $video_id,
'description' => $description,
'picture' => 'http://img.youtube.com/vi/' . $video_id . '/0.jpg',
);
//incase of text
$attachment = array(
'message' => $message,
'name' => $title,
);
}
foreach($users as $uid=>$token){
$attachment['access_token'] = $token;
if (isset($photo)) {
$facebook->setFileUploadSupport(true);
$fb_result = $facebook->api('/' . $uid . '/photos', 'post', $attachment);
} else {
$fb_result = $facebook->api('/' . $uid . '/feed/', 'post', $attachment);
}
}