Reputation: 1561
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.
Upvotes: 2
Views: 3367
Reputation: 1059
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.
Upvotes: 2