Category:PHP
From Facebook Developer Wiki (FbDevWiki.com)
To initialize the PHP SDK: (does not send anything to Facebook)
<?php
require './facebook.php';
$facebook = new Facebook(array(
'appId' => 'YOUR APP ID',
'secret' => 'YOUR API SECRET',
'cookie' => true, // enable optional cookie support
));
Except for authentication, all the interactions with Facebook are done via the .api() method.
Example getting information on the currently logged in user:
try {
$me = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
}
links:
Pages in category "PHP"
The following 10 pages are in this category, out of 10 total.