Note that there are some explanatory texts on larger screens.

plurals
  1. POOauth dialog redirection php in Facebook. How to redirect to app page
    primarykey
    data
    text
    <p>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 <a href="https://developers.facebook.com/docs/reference/dialogs/oauth/" rel="nofollow">https://developers.facebook.com/docs/reference/dialogs/oauth/</a>.</p> <p>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.</p> <pre><code>If the user clicks "Allow", they will be directed to http://www.example.com/response#access_token=...&amp; expires_in=3600 If the user clicks "Don't Allow", they will be directed to http://www.example.com/response? error=access_denied&amp; error_description=The+user+denied+your+request. </code></pre> <p>I don't want to go to example.com but to facebook.com/app/ID_APP which contains example.com</p> <p>EDIT:</p> <p>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</p> <p><a href="https://www.facebook.com/dialog/permissions.request?app_id=53434949999999&amp;display/=page&amp;next=http%3A%2F%2Fwww.example.com%2Fapp%2F%3Fnext_url%3Dhttp%253A%252F%252Fapps.facebook.com%28403a2224870942%252F&amp;response_type=code&amp;fbconnect=1&amp;perms=email%2Cread_stream" rel="nofollow">https://www.facebook.com/dialog/permissions.request?app_id=53434949999999&amp;display/=page&amp;next=http%3A%2F%2Fwww.example.com%2Fapp%2F%3Fnext_url%3Dhttp%253A%252F%252Fapps.facebook.com%28403a2224870942%252F&amp;response_type=code&amp;fbconnect=1&amp;perms=email%2Cread_stream</a></p> <p>(we can see the my site url <em>example.com</em> encoded with a parameter 'next_url' to which the user will b redirected from my site page) </p> <p>the URL of the wrong way looks like this (Just changin my site to my facebook app url )</p> <p><a href="https://www.facebook.com/dialog/oauth?client_id=185340534870942&amp;redirect_uri=http%3A%2F%2Fapps.facebook.com%2F534349499999s992%2Fhello.php" rel="nofollow">https://www.facebook.com/dialog/oauth?client_id=185340534870942&amp;redirect_uri=http%3A%2F%2Fapps.facebook.com%2F534349499999s992%2Fhello.php</a></p> <p>So my solution is what I commented. The user gets to my site and is redirected to the facebook app URL. </p> <p>Anyone can guess why Floyd Wilburn's solution doesn't work for me?</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload