I use Facebook Graph API to get user's email as user account in my system.
It works well 99.9% when user accept the email permission.
But in some accounts, I got 'null' even when user accept the email permission.
and I checked the setting of one account, nothing unusual or different from others.
Do anyone knows what's happened and how to solve it?
many thanks,
Phil
It's possible that some users simply won't have an email - it's possible to sign up for Facebook with a cell phone only - if there's some other reason i'm not aware of it, it could be a bug with the API
Related
i am working on a new project, and i want to get all user photos in facebook by providing an email address using the facebook graph-api.
I tried to search for some information for how to do it, but with no luck.
Is it possible to implement this?
You can only get photos of a user by authorizing the user with the user_photos permission. After that, use the /me/photos endpoint. There is no way to get photos (or any data) by email.
"The Facebook SDK obtains an OAuth token that Amazon Cognito uses to generate AWS credentials for your authenticated end user. Amazon Cognito also uses the token to check against your user database for the existence of a user matching this particular Facebook identity. If the user already exists, the API returns the existing identifier. Otherwise a new identifier is returned." - AWS Docs
Is Amazon Cognito only checking for the same Facebook user already in the database, or is it checking all users for matching fields, such as email? I am needing to allow for a user to sign in with email, Facebook, or Google and get the same data regardless. Basically I'm asking if Amazon Cognito links the users together automatically by email, or if this isn't the way to do it.
So if I understand your question correctly in line with what I've said above - I can't currently see an update to the features that I'm talking about - I'm happy to be wrong but....
Federated identities are very separate things if they're not the same session, in order for an identity to be linked they have to already be logged in with the old one and login with something else - in effect although on paper Cognito looks awesome this is why we hadn't used it, our problems were this:
(replacing # with !)
marc!marc.com signs into the user pool.
marc!marc.com signs in via facebook.
marc!marc.com signs in via anything else.
You'll probably end up with 3 users if they're three separate sessions - despite what AWS say if you read here it looks like you can link ID's you can but only if they logged in with the original ID first.
Yes this is silly, yes it really isn't fit for purpose - at a major hotel chain I talked in AWS offices about this and the upgrades were on the roadmap - I haven't revisited it since so hopefully I'm wrong!
NOTE
Please do not accept this answer for about 24 hours as I'd like to give anyone else the opportunity to chip in, I think I'm 100% correct but I haven't looked at Cognito for a while(and I'm a bit scared to because the docs aren't great(sorry AWS) and it nearly drove me off a cliff last time trying to do exactly what you're trying to).
I am new to graph api.
i have done slight reading and found that we need access tokens for accessing a profile, but for my application i only have access to the email-id of a person
I just wanted to know if i can get anyone's basic profile information by just knowing thier E-mail id.
help in anyway way would be appreciated.
No, without authorization you can´t get any user info, and you can´t search for Facebook users by email. You would have to authorize users with the email permissions and compare it that way.
I want my rails app, which i use devise gem, not to give away the availability of an email in my database when a user requests to reset his/her password, after he/she has forgotten it while trying to login.
Please if possible you can also provide the link of the reference material for me to understand it better.
I assume you mean that you don't want the app to say that an account with that email address was found in your database in case this is used as a way to find account names to try and break into. If so, then devise has a paranoid setting which will mean that the messages for password reset, resend confirmation etc. are vague and say that an email will have been sent if that email address exists in the database, without actually saying if it does or not. (It doesn't do this for registerable because if someone tried to create an account with a duplicate email address, devise thinks they should be told the creation failed.) The line you need in your devise.rb initialiser is:
config.paranoid = true
It's probably already there, just commented out with a comment above explaining it.
Here's a link to the blog post announcing this feature:
http://blog.plataformatec.com.br/2013/11/e-mail-enumeration-in-devise-in-paranoid-mode/
I have worked earlier on facebook API. I successfully used it and fetched all friend lists with their email ids. I was also able to get user email id who logged in through facebook API.
Now in gap of 7-8 months I found that faceAPI development section has been changed . New one is something different.
And now I am facing problem to get email id after user login at facebook.Yet all other details are coming like user name .user id and location except email id.
Old script is also not working with me. Could you help me to get email id of user who get login by facebook at my website.
Thanks for your cooperation.
No one will do your homework (upgrade the code for you)
Read the most current documentation
Accessing users e-mails require a special permission email
Users may choose not sharing their direct e-mail with you
You didn't say what technology you are using, but you can check the PHP-SDK example page to get started.
Direct Access Method:
Log into Facebook under your name. If you need an "Access Token", Click on the Extended Permissions and click the "read_friendlist" check box to get your Access Token and then
submit your query. You may need to "Allow" access, so just follow the prompts given.
Voila! You now have the usernames for everyone on your Friends List. The "username" parameter in the query will give you the contact email "message to that person" and you append #facebook.com and send them a message. Very simple.
http://developers.facebook.com/tools/explorer?fql=SELECT%20username%20FROM%20user%20WHERE%20uid%20IN%20%28SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me%28%29%29%20ORDER%20BY%20name
I had been using the import function in Yahoo Mail but now it has been limited to the first 50 names on your friends list. Where I work, they have over 6,000 friends between the two pages. This is a very simple solution to my problem. And now I can write a very small PHP sendmail program and send EVERYONE on the friends list an email message that goes directly to their messages. No more viewing page sources or manually doing this.
I can create a special email list on IFanz that will handle all dups, even if I repeat this process on a monthly basis to acquire new emails.
-SAB