WordPress.org

Ready to get started?Download WordPress

Forums

Wordbooker
Integration with WP-FB-AutoConnect (15 posts)

  1. justin_k
    Member
    Posted 3 years ago #

    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);
    }
    //New
    update_comment_meta($newComment, "fb_uid", $comment[fromid]);
  2. Steve
    Member
    Plugin Author

    Posted 3 years ago #

    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 ;-)

  3. justin_k
    Member
    Posted 3 years ago #

    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;

  4. Steve
    Member
    Plugin Author

    Posted 3 years ago #

    Which attribute is that?

  5. justin_k
    Member
    Posted 3 years ago #

    If both of our plugins adds

    xmlns:fb="http://www.facebook.com/2008/fbml"

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

  6. Steve
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  7. justin_k
    Member
    Posted 3 years ago #

    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.

  8. Steve
    Member
    Plugin Author

    Posted 3 years ago #

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

  9. justin_k
    Member
    Posted 3 years ago #

    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.

  10. Steve
    Member
    Plugin Author

    Posted 3 years ago #

    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

  11. justin_k
    Member
    Posted 3 years ago #

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

  12. Steve
    Member
    Plugin Author

    Posted 3 years ago #

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

  13. justin_k
    Member
    Posted 3 years ago #

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

  14. Steve
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  15. justin_k
    Member
    Posted 3 years ago #

    Cool...well, looking forward to it :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags