大家好,我有个小问题,不知道怎么解决。我有这个功能:
public function postOnUserWall($message, $linkTitle=false, $link=false, $description=false, $picture=false) {
$attachment = array(
'message' => $message
);
if ($linkTitle != false) {
$attachment['name'] = $linkTitle;
}
if ($link != false) {
$attachment['link'] = $link;
}
if ($description != false) {
$attachment['description'] = $description;
}
if ($picture != false) {
$attachment['picture'] = $picture;
}
try {
$publishStream = $this->facebook->api("/" . $this->user . "/feed", 'post', $attachment);
//as $_GET['publish'] is set so remove it by redirecting user to the cbase url
} catch (FacebookApiException $e) {
d($e);
}
}
我正在使用 Facebook PHP SDK 3.0。