Reputation: 21
I'm using omniauth-facebook gem & devise gem to accomplish the facebook login on my site (Rails website). When using facebook login, I'll request email field and save it in my database. Everything works fine so far. But I found there are two situations I can't receive email fields.
I can't differentiate these two situations, because the email are all nil. Does anyone meet the same problem and get a nice solution or workaround?
Much appreciated:)
Upvotes: 2
Views: 53
Reputation: 1836
Look at this requesting-and-revoking
It has call
GET /{user-id}/permissions
And in response
{
"data": [
{
"permission": "public_profile",
"status": "granted"
},
{
"permission": "publish_actions",
"status": "granted"
},
{
"permission": "user_friends",
"status": "declined"
}
]
}
From here you can easily differentiate that whether its email permission declined or not.
If email permission granted & no email exist in response data than its surely a case of registration through phone
Upvotes: 0