Note that there are some explanatory texts on larger screens.

plurals
  1. POAgileToolkit OAuth add-on error 500 at facebook's mobile site
    text
    copied!<p>I am using the OAuth Facebook controller add-on for ATK4. </p> <ul> <li>It works as expected when authenticating with Facebook from a regular desktop browser.</li> <li>It works when authenticating using a mobile browser that is telling face book that it's a desktop browser.</li> <li>It does not work when Facebook detects a mobile browser and redirects to m.facebook.com/dialog/oath.</li> </ul> <p>What's more, is that it works fine for signups from mobile browsers (ie, when Facebook asks the user to give permission to the app).</p> <p>The login flow stops with an Error 500 at: <a href="https://m.facebook.com/dialog/oauth?redirect_uri=" rel="nofollow">https://m.facebook.com/dialog/oauth?redirect_uri=</a>{my_url_encoded_landing_page_where_the_OAuth_controller_lives}&amp;scope=email&amp;client_id={fb_app_id}</p> <p><strike>What the hell is going on here? There isn't some difference between the Facebook mobile service and the regular one that the addon isn't taking care of, or is there?</strike></p> <p>It must be something I'm doing wrong. In init() on the page that handles the FB, I am doing the following:</p> <pre><code>function init(){ parent::init(); $f = $this-&gt;add("oauth/Controller_OAuth_Facebook", array('sign_method'=&gt;'PLAINTEXT')); if ($fbtoken = $f-&gt;check()) { $f-&gt;setSignatureInfo(); $f-&gt;setAuthToken($fbtoken["access_token"], $fbtoken["expires"]); $s = $this-&gt;add("sni/Controller_SNI_Facebook"); $s-&gt;setOAuth($f); // ... // grab profile from SNI, database lookup, session stuff, etc // ... } } </code></pre> <p>I've tried all three sign_methods, and tried leaving it alone, but that doesn't make much difference because the user is not making it back to the controller with an access token to use anyway.</p> <p>I tried creating a new app with Facebook and I get the same issues with a basically vanilla configuration on that. I've only marked and specified the "Website with Facebook Login" site URL integration.</p> <p>The image below was captured from Chrome after overriding the user agent to a mobile device to trigger the forward to facebook's mobile servers: <a href="http://i.stack.imgur.com/RJTHx.png" rel="nofollow">Screen shot of request</a></p> <p>Facebook closed my bug report with them stating that it's not an issue since no one else is reporting the bug. I am removing the ATK4 tag, as I get the same issue using the example PHP code provided by Facebook on GIT.</p>
 

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