使用Graph API Explorer(https://developers.facebook.com/tools/explorer)如何在单击&#34时指定任何对象参数而不仅仅是字符串值;添加字段&#34 ;?诸如帖子的actions
字段之类的对象数组(https://developers.facebook.com/docs/reference/api/post/)
答案 0 :(得分:2)
它是一个json对象。
例如来自this answer
$attachment = array('message' => 'this is my message',
'name' => 'This is my demo Facebook application!',
'caption' => "Caption of the Post",
'link' => 'http://mylink.com',
'description' => 'this is a description',
'picture' => 'http://mysite.com/pic.gif',
'actions' => array(array('name' => 'Get Search',
'link' => 'http://www.google.com'))
);
$result = $facebook->api('/me/feed/',
'post',
$attachment);
Graph API Explorer中的actions
字段
[{"name":"Get Search","link":"http:\/\/www.google.com"}]