Take the 2-minute tour ×

I'm using the plugin WPBook, I'm wanting to use the Facebook PHP SDK. How can i get access to the facebook Object that WPBook is ising. Do anyone of you know how to access it from WPBook, I know it is a global variable somewhere, how do i load it??

share|improve this question

2 Answers 2

Take a look at /plugins/wpbook/includes/publish_to_facebook.php.

They only have one function that posts to FB. You should be able to cobble something together from their code.

Just make sure if you write your own files to them in a separate folder in your plugins directory. Otherwise any updates to WPBook will overwrite your files.

The whole PHP SDK is in /plugins/wpbook/includes/client/

share|improve this answer
Beat me to it. :) –  EAMann Apr 26 '12 at 18:01
Do you have any idea how i can use this facebook PHP SDK from there?? –  Noor Apr 29 '12 at 6:54

Ok, I got it,

to access the facebook Object, its a global variable declared by WPBook,just do this where you want to use the facebook object;

global $facebook;
share|improve this answer

Your Answer


