【问题标题】:Is it possible to get the number of users messaged by the send dialog是否可以获得发送对话框发送消息的用户数量
【发布时间】:2012-03-09 03:10:04
【问题描述】:
我想知道当用户使用“发送对话框”向特定朋友发送消息时,是否可以检索用户发送消息的人数/朋友(只需一个数字即可)。我一直在查看发送对话框的文档,但似乎没有关于此的任何信息。(https://developers.facebook.com/docs/reference/dialogs/send/)。
在这个阶段我能想到的另一种方法是使用图形 API,但我需要知道用户刚刚发送的消息的 messageID。
【问题讨论】:
标签:
facebook
facebook-graph-api
facebook-social-plugins
facebook-ui
【解决方案1】:
是的,你可以得到计数
首先:您应该知道用户何时发送消息检查下面的链接
这是给你的样本
测试它:
http://www.fbrell.com/saved/d002a25a351e6b01b0526b2606b48750
<script>
FB.ui({
method: 'send',
name: 'People Argue Just to Win',
link: 'http://www.nytimes.com/2011/06/15/arts/people-argue-just-to-win-scholars-assert.html',
},
function(response) {
if (response) {
alert('message sent.');
} else {
alert('not sent');
}
}
);
</script>
第二个:使用jQuery & via jquery load ($().load('page.php');
您可以使用 uid 保存谁发送了消息,当然您可以每次都获得计数