嘿家伙, 我有一个小问题,我不知道如何解决它。 我有这样的功能:Facebook PHP sdk在我的墙上张贴两次
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。
这里似乎没有足够的信息来回答你的问题。你如何调用函数?除了双重发布之外,您还看到了该剧本的其他功能吗?你的网络服务器日志显示脚本执行两次了吗? – Mat 2011-05-26 14:22:20
我有一个问题,下面是代码,我不知道如何解决它..你认为你错过了什么? – RobertPitt 2011-05-26 14:31:06
不叫两次。单次通话和服务器不报告任何双重发帖!这是ideea。在我的墙上贴着2秒钟的帖子。 – 2011-05-26 14:32:41