我创建了一个fb应用程序,每次用户刷新画布页面时都会更改它的输出。我想分享画布页面。这是我的代码 function share(){
FB.ui(
{
method: 'feed',
name: '<?= $appname;?>',
link: '<?= $canvasURL;?>',
picture: '<?php echo $callBackURL.$appimagename;?>',
caption: '<?=$wallpub;?>',
description: '<?= json_encode(strip_tags($line, ''));?>',
actions: [{ name: '<?= $walllink;?>',text: '<?= $walllink;?>',link: '<?= $canvasURL;?>', href: '<?= $canvasURL;?>'}],
message: ''
},
function(response) {
if (response && response.
_id) {
//alert('Post was published.');
} else {
//alert('Post was not published.');
}
}
);
}
按下按钮使其正常工作
<FORM><INPUT TYPE="BUTTON" OnClick="share();" VALUE="Share with friends" class="submitButton"></form>
看起来一切都好。但不能正常工作。请参阅此app
中的演示任何帮助都会非常有帮助