Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.