Greetings Everyone,
I'm currently using Wordpress as my CMS and leveraging Facebook's Graph API for the user account/registration "stuff".
My question is how do I use Facebook's PHP SDK (found here: http://github.com/facebook/php-sdk/), when Wordpress compiles several php files to output a single webpage? In other words, Wordpress' templates header.php + index.php + footer.php = what you see on www.example.com
If I create my instance of the Facebook Application in HEADER.PHP, how will I make references to them in INDEX.PHP and FOOTER.PHP?
Thanks in advance!
----- SAMPLE CODE ---
in header.php
<?php
require '/facebook.php';
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => 'xxx',
'secret' => 'xxx',
'cookie' => true,
));
?>
in index.php
<?php
$session = $facebook->getSession();
?>