区分 Facebook 上已接受的申请请求与尚未接受的申请请求
我正在为 Facebook 开发一款游戏。 我使用申请请求,也称为邀请。
我想知道是否有一种方法可以区分已接受的申请请求和尚未接受的申请请求。用户接受请求后,我通过对 Graph API 的 DELETE 调用将其删除,如文档 中所述http://developers.facebook.com/docs/reference/dialogs/requests/(删除请求部分)。但我仍然可以使用 GraphAPI 获取应用程序请求。
根本问题如下。我检查每个传入 HTTP 请求中是否存在“request_ids”HTTP 参数,并在该参数存在时执行应用程序请求处理/删除。因此,如果用户通过邀请链接来到我的应用程序并按 F5,则另一个仍包含相同“request_ids”参数的 HTTP 请求将被发送到我的应用程序。我想知道申请请求是否已经被处理。
当然,我可以在我的数据库中跟踪它。但我正在寻找一些使用 facebook API 的解决方案。
将不胜感激任何建议。
I'm developing a game for Facebook.
I use application requests, also known as invites.
I'm wondering if there is a way to distinguish accepted application request from not yet accepted. After a user accepts the request, I delete it via DELETE call to Graph API as described in documentation http://developers.facebook.com/docs/reference/dialogs/requests/ (section Deleting Requests). But I still can GET the application request using GraphAPI.
The root issue is the following. I check the presence of "request_ids" HTTP-param in every incoming HTTP-request and perform app-request processing/deleting if the param is present. So, if the user came to my application by an invite link and hit F5, another HTTP-request still containing same "request_ids" param will be sent to my application. Here I would like to know if the application request has already been processed.
Of course I can track it in my database. But Im looking for some solution using facebook APIs.
Would appreciate any advice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么?在您发布的同一链接上,明确表明这是您的责任:
现在我认为向用户特定的应用程序请求发出
DELETE
请求实际上会使该特定应用程序请求的未来GET
调用无效。但即使情况并非如此,您也应该处理此类情况。Why? on the same link you posted, it's make clear that it's your responsibility:
Now I thought that issuing a
DELETE
request to a user specific apprequest would actually invalidate futureGET
calls for this particular apprequest. But even if that's not the case, you should be handling such cases.