WordPress.org

Ready to get started?Download WordPress

Forums

WPBook
[resolved] Multiple facebook library include issue from other plugin (6 posts)

  1. Sabuj kundu
    Member
    Posted 2 years ago #

    I am using wordpress plugin SEO Facebook comments and it uses the facebook application library and messed up with wpbook.

    If another plugin adds/loads the facebook library then facebook application end shows error. To solve this wp-content/plugins/wpbook/includes/client/base_facebook.php

    Change this file as http://pastebin.com/WMXycGWa

    Here what I did is checked if the classes not exists.

    thank you.

    http://wordpress.org/extend/plugins/wpbook/

  2. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    WPBook already does a check to see if the Facebook library already exists - is the problem that the SEO Facebook library includes a different version of the Facebook SDK?

  3. rashadow
    Member
    Posted 2 years ago #

    Just to add: I was having problems with getting the 'SEO Facebook Comments' plugin to play nice with WPBook and WPBook Lite. While SEO FB Comments was active, I would receive a 500 internal error when trying to view the FB version of my blog with WPBook. With the Lite, I would get a 500 internal error on the settings page, so I couldn't even configure it.

    I tried the changes to base_facebook.php that Sabuj kundu listed above and it looks to have solved my problem. The commenting system is working and I can get into the WPBook Lite settings. At this time, I have yet to post a new post or retry WPBook to see if all is well yet. But the fact that there are no 500 errors gives me hope. Site is http://silenciobarnes.com

  4. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    SEO Facebook Comments also says that it finds Facebook comments on your blog post and imports them - might duplicate WPBook Lite's import function.

    Looks to me like both WPBook and SEO Facebook Comments are including v3.1.1 of the Facebook API.

    WPBook (and WPBook Lite) do check to see if the "Facebook" class exists before importing the Facebook client - maybe it should check for the "BaseFacebook" class first?

    I'm reluctant to take in changes to the Facebook API based on a full pastebin - maybe I need to do a diff of the two files just to see what's changed?

  5. rashadow
    Member
    Posted 2 years ago #

    It looks like he added lines but did not modify any existing lines

    line 25: if(!class_exists('FacebookApiException')):

    lines 110-112: endif;

    if(!class_exists('BaseFacebook')):

    line 1148: endif;

    Compared the base_facebook.php contained in wpbooklite client folder with the copied pastebin using winmerge - http://winmerge.org/

  6. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Thanks @rashadow for doing the diff I hadn't found time to do. ;)

    I'll get these changes in the next release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic