Reputation: 31
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.
Upvotes: 2
Views: 480
Reputation: 38115
Of course I can track it in my database. But Im looking for some solution using facebook APIs.
Why? on the same link you posted, it's make clear that it's your responsibility:
When a user is directed to your application, by clicking a Request from the application, the games dashboard, or from a Request notification, you must delete the request after it has been accepted. Requests are not automatically deleted once they have been clicked, thus it is the developer’s responsibility to clear them once they have been consumed.
Now I thought that issuing a DELETE
request to a user specific apprequest would actually invalidate future GET
calls for this particular apprequest. But even if that's not the case, you should be handling such cases.
Upvotes: 0