0
由于某种原因,我的Facebook应用发布到允许该应用的用户的墙上,而不是他们的朋友喜欢它的设想。发布到我的墙上而不是其他墙上FBML Facebook API
我只是用
$facebook->api_client->stream_publish($message, $target_id);
任何人有什么想法?
由于某种原因,我的Facebook应用发布到允许该应用的用户的墙上,而不是他们的朋友喜欢它的设想。发布到我的墙上而不是其他墙上FBML Facebook API
我只是用
$facebook->api_client->stream_publish($message, $target_id);
任何人有什么想法?
是的,你没有使用正确的方法签名。这是从我的文件副本复制
public function stream_publish(
$message, $attachment = null, $action_links = null, $target_id = null,
$uid = null) {
所以你需要调用它像这样
$facebook->api_client->stream_publish($message, null, null, $target_id);
如果你刚刚起步,你可能会发现Graph API和new PHP SDK更容易。例如:
<?php
require './facebook.php';
$fb = new Facebook(array(
'appId' => 'YOUR APP ID',
'secret' => 'YOUR API SECRET',
'cookie' => true, // enable optional cookie support
));
$post = $fb->api("$target_id/feed", 'POST', array('message' => $message));
各种参数记录在底部here。