问题描述
||
我试图使用javascript构建一个Facebook应用程序。在我的应用程序中,用户会在延时弹出后获得结果和对话框。一切工作正常,除了这里是我的“贴墙对话”代码
<script>
var publish = {
method: \'stream.publish\',display: \'popup\',// force popup mode
attachment: {
name: \'Connect\',caption: \'The Facebook Connect JavaScript SDK\',actions: [{ name: \'action_links text!\',link: \'http://www.example.com\' }],description: (
\'A small JavaScript library that allows you to harness \' +
\'the power of Facebook,bringing the user\\\'s identity,\' +
\'social graph and distribution power to your site.\'
),href: \'http://www.example.com/\'
}
};
FB.ui(publish,Log.info.bind(\'stream.publish callback\'));
</script>
此行包含对我不起作用的操作。任何人都可以告知解决方案是什么...
解决方法
该属性应称为action_links而不是action,并且仅包含text和href值。使用类似:
action_links: [{ text: \'action link test\',href: \'http://example.com\'}]
,请注意,必须通过fb Web界面为应用程序定义操作!