WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.