For publishing stream in the old php sdk we used :
$facebook->api_client->stream_publish($message,$attachment);
Now I want to accomplish it in the new version of php sdk which doesn't support api_client but 开发者_开发问答instead uses
$facebook -> api(\\an array\\);
I have tried a lot to modify it myself but in vain.
If you use an array you will call the REST API anyway so you can stick to what you currently have. However, if you want to I think you could try something like
facebook->api(array('method' => 'stream_publish', 'message' => 'test message', 'attachment' => 'attachment details'));
Nonetheless, I suggest you use a proper Graph API method which is described here http://developers.facebook.com/docs/reference/api/post/ and works well.
精彩评论