Err*_*oid 4 post share facebook button
是否可以在Graph API中发布带有共享按钮的消息.我使用SDK-PHP v3和这段代码:
$args = array(
'access_token' => TOKEN_HERE,
'message' => 'message here',
'link' => 'http://www.example.com/',
'caption' => 'caption here'
);
$result = $facebook->api("/me/feed", "post", $args);
Run Code Online (Sandbox Code Playgroud)
它工作正常但共享按钮丢失.有一个评论和像按钮但没有分享按钮.请不要给我任何教程或fecebook文档的链接.如果你知道如何做到这一点,或者你知道不可能只写它.谢谢!
好的,我找到了解决方案.也许有人会感兴趣.要添加包含分享按钮的链接,您必须使用"我/链接"而不是"我/ Feed".
$attachment = array(
'access_token'=>TOKEN_HERE,
'message'=>'message_here',
'link' => 'http://www.example.com/',
);
$result = $facebook->api(
'me/links',
'post',
$attachment
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10439 次 |
| 最近记录: |