Reputation: 2000
I am developing a Canvas application in Facebook in php. When the user allows the permission it's redirected to my site, as the say in the help page https://developers.facebook.com/docs/reference/dialogs/oauth/.
But I don't want to be redirected to my site, I want to be redirected to the facebook page which contains my site in an iframe. How can I do this? It should be quite straightway.
If the user clicks "Allow", they will be directed to
http://www.example.com/response#access_token=...& expires_in=3600
If the user clicks "Don't Allow", they will be directed to
http://www.example.com/response?
error=access_denied&
error_description=The+user+denied+your+request.
I don't want to go to example.com but to facebook.com/app/ID_APP which contains example.com
EDIT:
after Floyd Wilburn's answer, I tried to put my app page but it doesn't work. It gives me an error. While the right URL looks like this
(we can see the my site url example.com encoded with a parameter 'next_url' to which the user will b redirected from my site page)
the URL of the wrong way looks like this (Just changin my site to my facebook app url )
So my solution is what I commented. The user gets to my site and is redirected to the facebook app URL.
Anyone can guess why Floyd Wilburn's solution doesn't work for me?
Thanks
Upvotes: 2
Views: 4344
Reputation: 1842
Just set the redirect_uri parameter to point at http://apps.facebook.com/yourapp/somepage and it will go there instead.
Upvotes: 2