'Facebook logon failing under selenium testing

I've got facebook logon working fine for my web app. However, when I use Behat/Mink/Selenium to logon to a test account on Facebook, it fails with the "Can't Load URL" error. I've check the app domain several times and tried a variety of settings. One difference I'm finding is that the URL going to Facebook when I'm logging on "live" is:

https://www.facebook.com/v2.5/dialog/oauth?client_id=xxxx&state=86130c41efb7e9e3ecdea1a00f5e0223&response_type=code&sdk=php-sdk-5.7.0&redirect_uri=http%3A%2F%2Flocalhost%3A8888%2Findex.php%2Fuser%2Ffacebookauth&scope=email

When I do the same thing with Selenium the URL is slightly different:

https://www.facebook.com/v2.5/dialog/oauth?client_id=xxxx&state=8fc097d677fac37545e0ff9da9c31ffa&response_type=code&sdk=php-sdk-5.7.0&redirect_uri=http%3A%2F%2Flocalhost%3A8888%2Findex.php%2Fuser%2Ffacebookauth&scope=email&ret=login&fbapp_pres=0&logger_id=f7b3bbe5-70b6-4f13-8714-9837843b8f9f&tp=unspecified&cbt=1644946792445&ext=1644950398&hash=AeafxmeStMNa8Ojdn4E

(I've removed the client_id, which is confirmed to be identical on both URLs).

So, why are all those new parms being added after the &scope parm?

Thoughts?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source