tags:

views:

1052

answers:

2

I'm trying to do a simple API call with facebook, with a user-given email to return their uid. Do I really need to auth them before this call is made?

Thanks! :) I'm not doing anything else with the UID besides displaying to the user, which is why I don't really think it's worth authenticating them.

A: 

I'm pretty sure you have to have the UID to get any information about a user. Email hashes or the proxied email are not indexed columns (see user fql table http://wiki.developers.facebook.com/index.php/User_(FQL)). Though it is pretty easy to get information about the current logged in user. The facebook javascript api/library is a good example.

FB_RequireFeatures(["Api"], function(){
    // Create an ApiClient object, passing app's API key and 
    // a site relative URL to xd_receiver.htm
    FB.Facebook.init(api_key, channel_path);

    var api = FB.Facebook.apiClient;
    api.get_session().uid;
});

http://wiki.developers.facebook.com/index.php/JavaScript_Client_Library

AdamB
A: 

Did you ever find out how to get the uid by querying the Facebook database and passing the database table the known email address?

Erik
it's impossible at this moment. Not a question of finding out how
ambertch