是否可以在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文档的链接.如果你知道如何做到这一点,或者你知道不可能只写它.谢谢!
我有一个问题,识别运行该功能的对象
<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)