PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, March 13, 2022

[FIXED] Facebook oAuth: Force email permission

 March 13, 2022     facebook, facebook-javascript-sdk, facebook-php-sdk     No comments   

Issue

How do sites like StackOverflow and Untappd "force" a user to accept their permissions?

When I've been trying with the JavaScript SDK I've been using the scope object to request email addresses, but I keep seeing "Edit the info you provide", allowing the user to not provide their email address. I've even tried following Manually Building a Login Flow, with the same results.

Image:

enter image description here

As we're giving the user the option to register on the site through Facebook, we're reliant on the email address to create an account within our database.

Yet sites like StackOverflow and Untappd offer no such option, I'm forced to accept those permissions.

So what's the secret? How do I achieve this? Is it a setting I'm overlooking somewhere? Or does it need to be "approved"?


Solution

They are using an old App created before end of April 2014, it was different back then. You can´t force it anymore, you can only check if the user authorized the permissions after login, with the return_scopes flag, for example:

https://developers.facebook.com/docs/reference/javascript/FB.login/v2.2



Answered By - andyrandy
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing