Support » Plugins and Hacks » [Plugin: Wordbooker] Integration with WP-FB-AutoConnect

[Plugin: Wordbooker] Integration with WP-FB-AutoConnect

  • Hey Steve,

    I’m the author of WP-FB-AutoConnect, and I have a very small code change which, if included, could allow me to integrate with your plugin in a pretty cool way.

    My plugin is essentially a Facebook Connect implementation, which includes a bunch of other features including the ability to replace WordPress avatars with Facebook profile pictures for “connected” users.

    As you know, your plugin allows comments to be imported from Facebook. Although each imported comment is assigned the same e-mail (as per the options), if you were to also store the uid of the user, I could then use my plugin to show the real avatar of the Facebook user who posted the comment, provided that user has logged into the blog before.

    I’ve already implemented it on my end and it works great. The only change needed to Wordbooker is to store the uid from which the comment came. After importing the comment in wordbooker_poll_facebook():

    if ($comment_approve==1){
      //Added $newcomment =
      $newComment = wp_insert_comment($data);
    else {
      //Added $newComment =
      $newComment = wp_new_comment($data);
    update_comment_meta($newComment, "fb_uid", $comment[fromid]);
Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Steve


    Justin – I’m happy to do that and I’ve just added it to the code in the V1 code base…. I’ll just have to remember to add it to V2 😉

    Sweet; look forward to the update 🙂

    FYI, I also added a check to my plugin to prevent the presence of both from breaking validation, due to a duplicate facebook attribute in the HTML tag:

    if( has_filter( “language_attributes”, “wordbooker_schema” ) ) return;

    Plugin Author Steve


    Which attribute is that?

    If both of our plugins adds


    to the html tag, it’ll fail validation, so I only have mine output it if yours isn’t present

    Plugin Author Steve


    Ahhh – I wonder if there is any easy way to check generically for the fbml namespace rather than checking specifically for my app? If there is then it would make things much more robust.

    True, but I don’t see how there could be – the best we can do is enumerate the filters that might be adding language_attributes, or to add a filter with a super-high priority, parse the actual string, and if that attribute is already found, don’t add your own. But even that isn’t very robust.

    Plugin Author Steve


    And its not something you want to do each and every time really is it – parsing the string.

    Definitely not 😉

    On another note, upon testing this a bit I think found a related bug:

    Although Wordbooker does indeed both push posts to and fetch comments from my Facebook wall, on my Fanpage, it only pushes posts – comments are not pulled back in the other direction.

    Plugin Author Steve


    Fan page comments can’t be pulled due to the way I wrote the code to pull comments. All of that was done before I added fan page support and so the code just doesn’t work.

    Thats one of the reasons why its all being re-written from scratch for V2

    Ah, gotcha.

    Just out of curiosity (…sorry…I’m sure it’s the question you’re the MOST fedup of answering, as I answer it constantly about my plugins too)…but any schedule idea? 😉

    Plugin Author Steve


    No schedule. Was planning to do some coding today but I’ve spent it chasing down a very very odd problem with offline sessions being invalidated almost immediately for one user.

    Then I’ve got to be at work at 06:45 tomorrow and thats going to be a 11+ hour day….

    Ait, coo. Was just curious if we were lookin at like…a few weeks or 8 months 🙂

    Plugin Author Steve


    It depends on how much I complete before I push V2 out. I’m tempted to get the core working (including comment handling) and make sure I’ve got the DB structure all in place and release it and then do pretty major functional releases where I add the additional functionality that people have been asking for. So 2.1 might add category handling. 2.2 might add the post queue, etc.

    Cool…well, looking forward to it 🙂

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Wordbooker] Integration with WP-FB-AutoConnect’ is closed to new replies.