tags:

views:

4365

answers:

4

Hello Folks,

I am trying to develop a application where

  1. The user 'X' has logged into Facebook
  2. app has a set of email addresses (possible friends of user 'X')
  3. app gets the list of friends of user 'X' (uids)
  4. Want to check if user with email address [email protected] is a valid facebook user by using email address and is user X's friend (basically a uid to email mapping)

Thanks!

A: 

check http://developers.facebook.com/

Rabiea
+1  A: 

I don't think this is possible. Facebook's API does not allow you to obtain a user's email address so you wont be able to do said mapping.

Refer to the Users.getInfo method, and it's lack of an "email" property.

Kurt Schindler
+4  A: 

Yes, this is possible. First, get the UIDs for all of a user's friends. Then, execute this FQL to get the email_hashes for each friend:

SELECT email_hashes FROM user WHERE uid IN (comma_delimted_set_of_uids)

Since you already have the email address, you can hash it and compare it to facebook's email_hash. If you have a match, you know it's valid. According to the FB documentation, the format of each email hash is the crc32 and md5 hashes of the email address combined with an underscore (_).

dc
A: 

hello i have a little question btw your line's and that is what if i can know any one UID How Can i get his email address without adding him ??? i need help by experts

MooT