我以前问过这个问题,但是以不同的方式,所以我希望这样问能得到答案:)
什么 API 调用会导致出现以下对话框:
http://dl.dropbox.com/u/222489/publishdialog.png
通过使用 FB.ui({method: 'stream.publish' ... 函数,我得到的只是一个“发布到你的墙”对话框,所有出色的 Facebook 游戏都会在屏幕截图中获得该对话框。所以我必须使用功能错误。
我不明白你是如何错过它的,这是 FB.ui 文档中的第一个代码片段:
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'http://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.',
message: 'Facebook Dialogs are easy!'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
我的测试应用程序的结果:
它被称为 Feed Dialogue.. 它是 Facebook 的三个对话之一,使用用户交互来完成一些工作... 我不需要 API 调用(可以使用
Facebook.showFeedDialog
,但现在 facebook 不支持它),而是将用户重定向到这些对话的 Url。
http://www.facebook.com/dialog/feed?<your different attributes as quesry string>
为了将其放在您自己的页面中,您可以通过设置属性
iFrame
在display=iframe
中打开它,但您需要一个访问令牌..
这是完整的描述..