我试图使用javascript建立一个Facebook应用程序。在我的应用程序中,用户在延迟弹出后获取结果和对话框。 Everthing工作得很好,除了这里的'post to wall dialog'的代码
<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>
包含不适合我的行动的行。任何人都可以告知解决方案是什么......
答案 0 :(得分:1)
该属性应该被称为action_links而不是action,只有text和href值。使用类似的东西:
action_links: [{ text: 'action link test', href: 'http://example.com'}]
答案 1 :(得分:1)
请注意,必须通过应用程序的fb Web界面定义操作!