Hi I was looking around the web, but I couldn't find any simple answers on how to get JUST the facebook id from the current user viewing my application. I understand that I need to get the User object from the Graph API and just get the id from that field. I also understand that I do not need an access token for my case. I am trying to do this in perl/mason and I was wondering if anyone could help me out with this. I am sorry if this is a duplicate, but I couldnt find that many answers out there with perl / mason
Thank you
Is there something as simple as this in perl /mason?
require 'facebook-php-sdk/src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'YOUR_APP_ID',
'secret' => 'YOUR_APP_SECRET',
));
// Get User ID
$user = $facebook->getUser();
Check out this
Looks like it will get you what you need.
Though I'm a bit confused what getUser() would return for an application. You've not specified anything to tell it what user you want, but I'm no facebook expert.