I am trying to make a Facebook app and need user id from Facebook when the user opens the applicaiton. I have setup my application and its show mock form on the Facebook canvas, I need help in connecting Facebook API to my page, would i need to download a API for that? And how do I get the user id from the JSON object which facebook says it sends to the application?
My test applcation is:
<?php
echo "this is working";
?>
This is working on Facebook.
Download the PHP SDK
A very simple code example to get the user id – if the user is logged in and has authorised the application then
$facebook->getUser()will give you the users id:Take a look a the examples within the SDK and on the Facebook Developers Site.