2010-07-12 101 views

回答

1

是的,你没有使用正确的方法签名。这是从我的文件副本复制

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); 
3

如果你刚刚起步,你可能会发现Graph APInew 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