小编Err*_*oid的帖子

使用API​​ Graph和缺少共享按钮发布到Facebook墙

是否可以在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文档的链接.如果你知道如何做到这一点,或者你知道不可能只写它.谢谢!

post share facebook button

4
推荐指数
1
解决办法
1万
查看次数

我是谁 - JQuery,插件,$ this,$(this),这个,访问变量

我有一个问题,识别运行该功能的对象

<div id="test1">lorem</div>
<div id="test2">ipsum</div>

<script type="text/javascript">
    $(document).ready(function() {
        $('#test1').plugin(); //alert: I am test1
        $('#test2').plugin(); //alert: I am test2

        $('#test1').plugin.fun(); //alert: I am undefined and I am undefined
        $('#test2').plugin.fun(); //alert: I am undefined and I am undefined
    });
    (function($) {
        $.fn.plugin = function() {
            $this = $(this);
            alert('I am '+$(this).attr('id'));//<-- it works
        }
        $.fn.plugin.fun = function() {
            alert('I am '+$(this).attr('id')); //<-- doesn't work!
            alert('and I am '+$this.attr('id')); //<-- also doesn't work!
        }
    })(jQuery);
</script>
Run Code Online (Sandbox Code Playgroud)

jquery plugins this

0
推荐指数
1
解决办法
1022
查看次数

标签 统计

button ×1

facebook ×1

jquery ×1

plugins ×1

post ×1

share ×1

this ×1