tags:

views:

47

answers:

2

Hey,

I'm new to the facebook app making and I'm just wondering how I can get the user who enabled the app (the one using it)'s user id.

Thanks

+1  A: 

Like this:

$facebook = new Facebook('API', 'SECRET');
echo $facebook->user;
Sarfraz
A: 

The new PHP SDK is available here: http://github.com/facebook/php-sdk. It has an example that shows how to get the user id and profile: http://github.com/facebook/php-sdk/blob/master/examples/example.php.

daaku

related questions