官方文档: https://developers.facebook.com/docs/dialogshtml
FB的对话框主要是调用 FB.ui(); 方法。api
有问题上官网看文档是最好的。app
1. send Dialog (发送message)post
JS 调用ui
FB.ui({ method: 'send', link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
to: '123456', });
URL 调用 (这个还不肯定用法)spa
http://www.facebook.com/dialog/send? app_id=APPID &link=http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html &redirect_uri=APPURL
参数说明code
app_id : htm
redirect_uri : 跳转连接 (不肯定用法)blog
display : 显示方式 (不肯定用法)图片
to : 接收消息的人
link : 消息带的连接
2. Feed and Share Dialogs
JS 调用
var obj = { method: 'feed', // name: name, // link名字 caption: ' ', // 标题 description: desc, // 描述 link: href, // feed 连接 picture: feed_img_path+msrc, // feed图片 display:'iframe', // 显示方式 actions:{ // feed动做 name: action, // 动做名字 link: href // 动做连接 }
};
FB.ui(obj, function(d){}); // 主动发送
FB.api('/me/feed', 'post', obj, function(d){}); // 自动发送
其他参数:
from: 从某人接收过来
to : 发送给某人
properties: 一些属性,出如今description后面,一对key/value 对应一行
3. Friends Dialog
FB.ui({ method: 'friends', id: 'brent' }, function(response){});