+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 24

Thread: FaceBook widget

  1. #1
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default FaceBook widget

    I need to integrate FaceBook with WordPress. I want to grab some FaceBook status updates and dump them into the WordPress sidebar. There is an ugly FaceBook javascript code you can get, but it looks horrid and doesn't gel well with most them designs.

    Do any of you know of a better way to do this? What I would ultimately like is a plugin which grabs the updates from FaceBook, stores them in the WP database and spits them out into a widget so that they're styled the as the rest of the WP theme.

  2. #2
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,717

    Default

    Quote Originally Posted by Ryan View Post
    I need to integrate FaceBook with WordPress. I want to grab some FaceBook status updates and dump them into the WordPress sidebar. There is an ugly FaceBook javascript code you can get, but it looks horrid and doesn't gel well with most them designs.

    Do any of you know of a better way to do this? What I would ultimately like is a plugin which grabs the updates from FaceBook, stores them in the WP database and spits them out into a widget so that they're styled the as the rest of the WP theme.
    Try one of the Lifestreaming plugins. I use Lifestream, which I believe can do what you're wanting (though I use it differently).
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  3. #3
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

  4. #4
    Jeffro's Avatar
    Jeffro is offline WPTavern Forum Admin
    Join Date
    Jan 2009
    Location
    Ohio
    Posts
    2,107

    Default

    Saw this floating around Twitter the other day, 12 useful plugins for Facebook.

    http://www.webdesignbooth.com/12-use...-for-bloggers/

    Anything in there that looks useful?

  5. #5
    andrea_r's Avatar
    andrea_r is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,279

    Default

    OOoooo, we were looking for soemthign liek this too. FB makes it *incredibly hard* to get your own status updates & show them on your blog hosted elsewhere.

    Gotta write a darn API for friggin' everything.

  6. #6
    Otto's Avatar
    Otto is offline Trac Master
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    770

    Default

    You can do this with XFBML, once your configure your site for Facebook Connect. It's actually shockingly easy.

    Quick rundown: First, you need to set up your site for Facebook Connect. This is easier than it sounds, and you don't have to allow Facebook logins or anything else to make this work.

    First, go here: http://developers.facebook.com/setup.php . Follow the instructions. There is a file you will need to download and then upload to the web root of your own site. This is actually necessary, for cookies and such so that FB can check credentials (to obey privacy restrictions). It *must* be on your own site, same domain and such.

    Now, on your own site, edit your theme's header.php file. Add this to the html tag as an attribute: xmlns:fb="http://www.facebook.com/2008/fbml" . This is necessary for IE.

    Next, you need to load the Facebook Javascript. It's actually pretty tiny, since it doesn't load all the FB javascript stuff, just a small loader script that loads other scripts on an as-needed basis. So, just add this somewhere inside the body of the page (NOT in the head!). Preferably just after the opening body tag:
    HTML Code:
    <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> 
    Okay, now that you've got that out of the way (it's a one time step to set up for FB connect on any given site), we get to the good bits.

    First, you need the API key for your app. You should have gotten it when creating the app, but if not, find your app here:
    http://www.facebook.com/developers/apps.php and get the API key.

    Now, add this script right before the ending </body>, probably in your footer.php. Note that you need to put in your API key AND the link to the xd_receiver.htm file that you uploaded to your web root:
    HTML Code:
    <script type="text/javascript"> 
    FB_RequireFeatures(["XFBML"], function(){
    FB.Facebook.init("YOUR_API_KEY_HERE", "http://EXAMPLE.COM/xd_receiver.htm");
     }); 
    </script> 
    That needs to be at the end of the page, last thing.

    Go here: http://developers.facebook.com/tools.php?fbml

    Now, you're going to need your user profile ID number. It's on that tools page. Mine, for example, is 531132304.

    Put this code on your page wherever you want your status. Also, yes, it will work in a Text Widget just fine.
    HTML Code:
    <fb:user-status uid="YOUR_PROFILE_NUMBER_HERE" linked="true"></fb:user-status> 
    Voila. It makes it get the status from Facebook, in real time. Note that this *will* obey Facebook privacy requirements, so if your status is not "public", then only your friends on FB (who are also logged into F will be able to see it. "Public" is visible to anybody, including people not on Facebook.

    Once you've done all this, BTW, you have full FB connect capabilities. All the XFBML you want to use is available to you now, without adding a lot of extra code. All the above was just setup except for the last step.

    XFBML code: http://wiki.developers.facebook.com/index.php/XFBML

    That tools page you were looking at lets you test FBML code. Just type the code into the big box on the left, then hit the button to see the resulting output on the right. Go ahead, put your user status line in there and try it, you'll see your current user status.
    Last edited by Otto; 10-12-2009 at 03:57 PM.

  7. #7
    andrea_r's Avatar
    andrea_r is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    Eastern Canada
    Posts
    1,279

    Default

    Let me clarify: :D

    Now do it on a WPMU install so each blogger can add their status in their sidebar if they choose to.

    (I snagged some plugins above to test)

  8. #8
    chipbennett's Avatar
    chipbennett is offline WordPress Legend
    Join Date
    Feb 2009
    Location
    St. Louis, MO
    Posts
    1,717

    Default

    Quote Originally Posted by Jeffro View Post
    Saw this floating around Twitter the other day, 12 useful plugins for Facebook.

    http://www.webdesignbooth.com/12-use...-for-bloggers/

    Anything in there that looks useful?
    Anybody have any experience with that JanRain RPX plugin in particular, or FaceBook (et al) login (authentication) in general? So far, I just use OpenID authentication. Is there any current need or benefit to allowing authentication through FaceBook, MySpace, Google, etc.?

    For those who use them, what are your experiences?
    WP TurnKey - Turn-Key WordPress installation and maintenance services
    WordPress user since 2005 | @chip_bennett | chipbennett.net | cbnet Plugins

  9. #9
    Otto's Avatar
    Otto is offline Trac Master
    Join Date
    Apr 2009
    Location
    Memphis, TN
    Posts
    770

    Default

    I configured FB Connect for commenting only on my blog the other day. Just to learn how it works, sort of thing. Pretty easy to do, really. Makes "anon" commenting somewhat simpler.

    I won't try to use Google authentication, because it can't be done entirely through javascript and I don't feel like dealing with PHP code to do it.

    Twitter has the same basic problem, OAuth is complete crap if you want a nice integrated user experience. Redirecting users elsewhere and back is annoying.

    Generic OpenID *can* suck in this way as well, but doesn't have to, which is okay.

  10. #10
    Ryan's Avatar
    Ryan is offline WPTavern Forum Moderator
    Join Date
    Jan 2009
    Location
    New Zealand
    Posts
    2,418

    Default

    Awesome. Thanks Otto :)

    I might write up a blog post for the Tavern on how to do some of this integration.

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts