我不明白如何实现请求对话框中的删除请求
我已阅读此处的文档 但我不明白我应该如何正确实施它。 在我的 Facebook 应用程序中,我使用 JS api 中的 apprequests
,如下所示:
function newInvite() {
var msg = document.getElementById('msg_look_id').value;
var receiverUserIds = FB.ui({
method: 'apprequests',
message: msg,
title: "Select friends to send your gift",
},
function (response) {
alert("IDS : " + response.request_ids);
});
//http://developers.facebook.com/docs/reference/dialogs/requests/
}
然后用户在其应用程序请求图标中看到该请求(带有红色数字)
用户点击它,那么我该如何实现删除请求呢?
I have read the document here
but I don't understand how should I implement it right.
In my facebook app I use apprequests
from JS api like this:
function newInvite() {
var msg = document.getElementById('msg_look_id').value;
var receiverUserIds = FB.ui({
method: 'apprequests',
message: msg,
title: "Select friends to send your gift",
},
function (response) {
alert("IDS : " + response.request_ids);
});
//http://developers.facebook.com/docs/reference/dialogs/requests/
}
then the user see the request in its app request icon (with the red numbers )
the user click it , but then how do I implement the delete request ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当用户根据请求到达应用的画布页面时,会有一个名为
request_ids
的参数传递给您的应用。由于 Facebook 使用 HTTP 方法 POST 调用 iframe 中的应用程序,我猜这也是一个 POST 参数(尽管文档中没有明确提及)。这意味着您无法使用纯客户端 JavaScript 来访问它;您必须使用服务器端脚本来获取此参数的内容。
When the user arrives at your app’s canvas page following a request, there is a parameter called
request_ids
passed to your app.Since Facebook calls apps in the iframe using the HTTP method POST, I guess this is also a POST parameter (although it is not explicitly mentioned in the docs). That means you have no access to it using pure client-side JavaScript; you have to use a server-side script to get the content of this parameter.