The script is working fine, and when the user clicks on the the app icon(with the red notification), at the top right corner of the canvas, he gets redirected to ther app's index page(apps.facebook.com/MY-APP), which is also fine. My question is, what parameter should I add in my FB.api call so that the user gets redirected to my desired app url(eg: apps.facebook.com/MY-APP/show-article/?article_id=5) instead of the index url.

1 Answer
1

Requests are only available for Canvas apps, not websites, as accepting a request will direct the user to the Canvas Page URL of the app that sent the Request.

Possible solution will be addition of desired URL within Request data property and once user land on your Canvas URL with requests_ids passed in URL arguments, read those requests and decide based on data property where user should be redirected.

data
Optional, additional data you may pass for tracking. This will be stored as part of the request objects created. The maximum length is 255 characters.

Update:
To get the data assigned with application/user request fetch it from Graph API:

I have also added the 'data' parameter(data: <REDIRECT-URL>)along with 'message', 'title' and 'access-token', but when I click on the pop-up notification all I can see is the request_ids getting passed, not the 'data'. How do i use this 'data'?
–
serpent403May 1 '12 at 6:00