Using the standard FB.ui apprequest stuff my app will send a request to a user. It will also return the request ID for me to save.
When the other user gets that request, if you hover over the link, you get to see the request IDs in the url. They look like this
https://apps.facebook.com/newsup-game/?fb_source=notification&request_ids=153603598154821&ref=notif&app_request_type=user_to_user¬if_t=app_invite
But when they click on the link, it goes to the 'add this app' dialog as expected. Now the URL is this
https://www.facebook.com/dialog/oauth?client_id=294990753960629&redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fnewsup-game&state=092385f0ea2b99808537b4970a4c84e8&scope=email%2Cpublish_actions%2Cuser_birthday%2Cuser_games_activity%2Cfriends_games_activity
When they finally click "play game", they are redirected back to the app where the URL is now this
https://apps.facebook.com/newsup-game/?state=092385f0ea2b99808537b4970a4c84e8&code=AQDEqV28lbF96g0tHeD9XjBjqzDFLpsF24jkJvh8LpaAynabRrfoiNu6DOtJv-Kyuc-TyCn32EeLpT2mATSCqKj9mnOQrdM6038OHXAayIfp67C3mO4uB2ZBUtuhn8lp-bjEfwF1EGtX_iZ8bBWlxbU2csL9doQtdlxQPgdFt-LDvkuG73CGnOW-YoVHrrWOOxXbVs0EjZNYGFWceOcZLS1i9ynubPBc4-r36agJfyznUNNJHDaJWA7TrJ6FvbOBDW5T9DwRHpBUdPTPkUo9Z-y74OIFTMXkYXyhexIo3suz9HtHn5ZhYUi1rHyomkUIbbU#_=_
So now the new user is back in my app, with 0 reference to the request. I am grabbing the request from the database and showing a list to the user, but I want them to be taking right into the game. They can of course click the same notification again, and it will work this 2nd time.
So, how can I pass the request ID along in the URL when a new user accepts an app invite?
Thanks!