I can't seem to get the stream_publish to work from the old API. I am using the old API because there is no option to upgrade with the current client.
$facebook->api_client->stream_publi开发者_Go百科sh("Test",null,null,$uid,$appid);
I get error 500 returned.
Any ideas?
I don't think you're calling the method properly.
Here's what the argument signature looks should look like
/**
* Publish a post to the user's stream.
*
* @param $message the user's message
* @param $attachment the post's attachment (optional)
* @param $action links the post's action links (optional)
* @param $target_id the user on whose wall the post will be posted
* (optional)
* @param $uid the actor (defaults to session user)
* @return string the post id
*/
public function stream_publish(
$message, $attachment = null, $action_links = null, $target_id = null,
$uid = null) {
But your code snippet shows $appid
where $uid
is expected.
Also, this wont work unless the user at $uid
has granted the proper permissions to your application.
精彩评论