后到的Facebook墙上用API图形和失踪分享按钮 [英] Post to facebook wall using API Graph and missing share button

查看:130
本文介绍了后到的Facebook墙上用API图形和失踪分享按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能在图形API发布与分享按钮的消息。我使用的SDK-PHP v3和这个code:

Is it possible to post a message with share button in Graph API. I use SDK-PHP v3 and this code:

    $args = array(
        'access_token' => TOKEN_HERE,
        'message'   => 'message here',
        'link'      => 'http://www.example.com/',
        'caption'   => 'caption here'
    );
    $result = $facebook->api("/me/feed", "post", $args);

它工作正常,但份额按钮丢失。有一个注释,像按钮,但没有分享按钮。请不要给我的教程或文档fecebook任何链接。如果你知道如何做到这一点,或者你知道这是不可能只写它。谢谢!

It works fine but share button is missing. There is a comment and like button but no SHARE button. Please do not give me any links to tutorials or fecebook documentation. If you know how to do this or you know it's not possible just write it. Thanks!

推荐答案

好吧,我发现的解决方案。也许有人会感兴趣。添加一个链接与分享按钮,您可以使用我/链接而不是我/饲料。

ok, I found solution. maybe someone will be interested. to add a link with share button you have to use 'me/links' instead of 'me/feed'.

$attachment = array(
    'access_token'=>TOKEN_HERE,
    'message'=>'message_here',
    'link' => 'http://www.example.com/',
);

$result = $facebook->api(
    'me/links',
    'post',
    $attachment
);

这篇关于后到的Facebook墙上用API图形和失踪分享按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆