Is it possible to Query Facebook users by E-mail address using FB API? - facebook

I spent a few hours the other day tinkering around with the Facebook API (FQL) and found it pretty cool! I saw that there is a way to query facebook users by their FB ID, but I was wondering if it's possible to query a FB user by an e-mail address.
What I would like this to do is to be able to do is...
1) query an e-mail address to see the user exists (assuming the user is set as public) -> similar to the way that you would copy and paste an e-mail address in the search box.
2) If the user exists -> fetch the first and last name.
3) else => echo "user does not exist"
If there is absolutely any way to do this, could someone point me in the right direction? I spent a few hours trying to figure this out and it was a complete fail. My guess is that it cannot be done, but I may be wrong. If anyone knows or has a simple script that they want to hand off, then that would be greatly appreciated!

No. The column you search by has to be "indexable" on this table

Related

Why "Fbclid" is not enough for attribution?

I've been tormented for a few months by this question!
I don't understand how Facebook pixel works deeply (and I assume only FB devs Know) but I have a few questions, if anyone can help me:
1- I launch a conversion campaign on Facebook ads, a specific ad gets a click, and a unique "fbclid" gets attributed to that click (?); if a conversion happens, and I send back the fbclid, Isn't Facebook supposed to be able to attribute it to the specific ad that generated that click, thus that fbclid? I thought that was the whole point of having a Server-to-server solution? since Apple announced iOS updates blocking cookies?
I come from an affiliate marketing background, we use tools like "Everflow" to track affiliate links, with a "transaction_id", that is, a unique value generated on every outgoing click. I thought the same logic would apply to fbclid.
Why are we asked to pass back to Facebook so much data when a conversion happens, like a name, email, etc... to be able to attribute the conversion to a campaign
( AND EVEN SO! Our Tracking is only 80% Accurate!!)
2- Can anyone explain how Facebook pixel actually works ? ignoring the Server to server (Conversion API ) solution, how does the Facebook base code + the conversion event script work to be able to attribute a conversion to a specific campaign? does it store the fbclid in your cookies? and when a conversion happens execute a request to Facebook?
3- AM I talking about 2 Different things here: FB attribution to campaigns VS Event matching? are they the same concept? Why is this so confusing to me? I couldn't find someone that's asking the same question, is it because I am missing something very obvious?
Thank you in advance!!

How can I get owner email for a Facebook App using the App Access Token

How would I get the email address associated with an active Facebook App ID, if all the usual methods (such as here, and here) don't return any email information with my creator-uid?
(I simply don't get the email field returned, even when I specifically request it as per here. I don't think this is a case of this as I didn't get an "App has no owner" error, or any error whatsoever.)
I've also tried this, but I'm in a catch-22 as I can't log in to select the application first.
I'm looking for the owner email address, so I can log in to make administrative updates following graph API updates.
Other specifics:
I get the following when I hit the Graph API via: https://graph.facebook.com/{my-app-id}?access_token={my-access-token} or https://graph.facebook.com/{my-app-id}?access_token={my-access-token}&fields=email
{
"name": "my-name",
"id": "my-creator-uid" }
I've tried to recover my FB account using all emails I can think of, but FB says 'no account exists' for each that I try. (This is a data-analytics corporate account being used to gather data for 12+ months, so I can't simply create a new account/app ID and start using that instead, as app-scoped user IDs will change.)
I've also tried viewing https://www.facebook.com/app_scoped_user_id/{my-creator-uid}/ and https://www.facebook.com/{my-creator-uid}/ from another company FB account, but both get:
Sorry, this content isn't available right now The link you followed
may have expired, or the page may only be visible to an audience
you're not in.
What else would you suggest? What might have happened? I've tried to contact Facebook, but that search led me to this forum post, so I'm here. Thank you in advance for your help.
This is not a programming question, try to get in touch with the Facebook Team, if you are working with Facebook paid services (like Advertising) you might have an account representative that can accelerate the things a little bit (But this can be a really long wait).
A more realistic option is to create a new profile and an new app, also your application will be reviewed as well (Take a little less time than previous option).

How to put log in box in a website to ensure one user can vote once only?

I have a school project to do which requires us to develop an online voting website. how do i ensure one user has voted once only?
the website is supposed to be in booths in public places which means i cannot use ip addresses or cookies. i was planning to use fb login id or maybe some other email id but i cannot find relevant codes/links. i just want people to go through the procedure of entering the log in id but not go to fb directly.
my website cannot be published online.
could you please suggest how i can achieve this? it is a bit urgent, thank you!

How to get Facebook Alternate Name via Graph API?

I am using the Facebook Graph API and Facebook Connect to make an authentication system in Wordpress. The Connect part goes all ok, the Facebook Graph goes ok as well.
But: How do I fetch the Facebook Alternate Name? I searched the docs at http://developers.facebook.com/docs/reference/fql/user/, but found no trace of it. Any ideas?
The main idea is that privacy is a concern, and the system goes better nickname based than just last name based. If the Alternate Name is empty I just ask the user to enter a nickname.
I think that it is not exposed yet, when i was looking for this, i made a work around...
I know that if you use the search_tokens field at user table, the array will have the alternate name... If you have luck, the array will contain the first, middle, last, and the alternative name, so, compare the arrays to the names, and exclude the know names, the other one is the alternative name....
Look this bug:
https://developers.facebook.com/bugs/371978199536659/

Facebook Connect: proxied_email not always returned by users_getInfo

Today I realized that FB Connect does not return the proxied_email field in about 4 out of 5 times. (I can reproduce this with a single users repeatedly, so this obviously does not have anything to do with privacy options or permissions)
It definitely worked fine last week ago.
I could not find any official info that this field is going to be removed or anything, so...
Does anybody else have this problem? Is there anything I am doing wrong that could be causing this behavior? Or is Facebook just having a bad day?
I did the following quick fix:
$personArray = $facebook->api_client->users_getInfo( $fb_config->user_id, "last_name, first_name, birthday, hometown_location, current_location, is_app_user, proxied_email" );
$email = $personArray[0]['proxied_email'];
if(empty($email)){
echo 'Proxied email was not retreived. Trying fql query...';
$facebookFQLResultXml = $facebook->api_client->fql_query("SELECT proxied_email FROM user WHERE uid=".$fb_config->user_id);
$email = $facebookFQLResultXml['proxied_email'];
}
I'm going to posit that it's just one of those Facebook days. There is supposed to be a big change this month that will change the way developers interact with users. Notifications will be removed, etc. Facebook is going to allow full access to a user's real email address (with the user's permission), and remove the proxied email system.
However, the official word is that the email proxy system should still be supported. According to http://wiki.developers.facebook.com/index.php/Roadmap_Email, users who have already granted proxy email permissions will continue to be available. However, it doesn't say anything about new users, so perhaps they have removed the email addresses for those that did not grant permission?
I noticed that they put the new privacy controls in place today, so it could be they made a change to the proxy at this time.
The same thing happened to me too. In the Facebook Connect JS API the proxied_email works about 80% of the time, but in the Facebook Developer Toolkit (for .NET) it barely works at all (which is strange cause I think they use the same facebook api under the hood).
This probably could have something to do with the somewhat failed privacy settings introduced the other day, as the whole proxy email functionality is related to facebook privacy (as zombat mentions above)? According to http://developers.facebook.com/live_status.php, the API seems to be under a fair amount of stress at the moment, cause it's acting a bit sluggish.
Do these things happen often? Where the facebook team either decide to just change the implementation overnight or where the service more or less nosedives?
It seems that the data returned by users_getInfo doesn't longer contains the proxied_email value
You can't circumvent the problem with FQL:
$aResult = $facebook->api_client->fql_query("SELECT proxied_email FROM user WHERE uid=$fbUid");
$sFbMail = $aResult[0]['proxied_email'];
I'm using the Facebook .NET Developer Toolkit and think it's just a bit buggy, which is why it didn't always work. In the end I also worked around the problem using FQL which worked really well (with a touch of XPath)