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??

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/

  • Beat me to it. :)
    – EAMann
    Apr 26, 2012 at 18:01
  • Do you have any idea how i can use this facebook PHP SDK from there??
    – Noor
    Apr 29, 2012 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;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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