开发者

$facebook->api_client->stream_publish($message,$attachment); in the new php sdk

开发者 https://www.devze.com 2023-02-01 22:17 出处:网络
For publishing stream in the old php sdk we used : $facebook->api_client->stream_publish($message,$attachment);

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消