Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deleting requests 2.0 for unauthenticated users

According to Facebook documentation the application is responsible to delete requests once users had accepted them. According to Facebook the application needs to combine the request-id with the user-id in order to delete the request. However, if the user has not authenticated the application yet, it is not possible to get their user id.

How should one approach this problem?

like image 473
Daniel Zohar Avatar asked Feb 28 '12 14:02

Daniel Zohar


2 Answers

The Facebook documentation states:

When a user is directed to your app by clicking accepting a Request you must delete the request after it has been accepted... thus it is the developer’s responsibility to clear them once they have been accepted

Notice the 'after it has been accepted' part - this means that it's your responsibility to delete the request ONLY if it has been accepted.

like image 197
pm_ Avatar answered Oct 04 '22 15:10

pm_


Per the documentation it is your responsibility to delete them.

The docs say you can user either your app access token or a user access token. So if the user is logged in just use their user access token. If the user is not logged in use the app access token.

 DELETE https://graph.facebook.com/[<REQUEST_OBJECT_ID>_<USER_ID>]?
       access_token=[USER or APP ACCESS TOKEN]
like image 24
DMCS Avatar answered Oct 04 '22 14:10

DMCS