WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Comments for WordPress
Fatal Error line 100 (4 posts)

  1. Beer
    Member
    Posted 3 years ago #

    I'm getting the following error on my front page, intermittently. It crashes the page of course. Since I'm not using comments on my front page, maybe this shouldn't even be doing anything unless it's on a single post page?

    Fatal error: Cannot use string offset as an array in /var/www/wordpress/wp-content/plugins/facebook-comments-for-wordpress/facebook-comments-combinecomments.php on line 100

    Plugin version is Version 3.1

    http://wordpress.org/extend/plugins/facebook-comments-for-wordpress/

  2. Stevie B
    Member
    Posted 3 years ago #

    Any responses or solutions to this?

    I get the exact same error myself. I'm using it on two sites, and the one that's now giving me this error it happened after I upgraded to the latest version of the plugin. Only difference is my error is on line 65 or something. But on the other site I'm using it on, it works perfectly. I've tried the same thing on both, so I don't know what the problem is.

  3. Beer
    Member
    Posted 3 years ago #

    For me the error is "Request to facebook timed out"

    It triggers a Fatal error. I was able to edit the line to at least allow my site to work, if the connect failed.

    Around line 100 in the file facebook-comments-combinecomments.php, I changed
    if ($result) {

    to

    if (is_array($result)) {

  4. Beer
    Member
    Posted 3 years ago #

    You can edit your theme, and add this to comments.php

    <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>" scrolling="no" frameborder="0" style="height: 62px; width: 100%" allowTransparency="true"></iframe>
    
    <div id="fb-root"></div>
    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
    <fb:comments href="<?php the_permalink(); ?>"></fb:comments>

    it would go just above <div id="comments"> in your comments.php file.

    see here for more info:
    http://developers.facebook.com/blog/post/472

    I used this tool to debug the issue:
    http://developers.facebook.com/tools/lint

    On Facebook, I found the Apps page. I went into Edit Settings, then Web Site and had to enter my main url, and domain name.

    Get the App ID and add this to your header

    <meta property='og:title' content='<?php the_title(); ?>' />
    	<meta property='og:site_name' content='Your Site Name' />
    	<meta property='og:url' content='<?php the_permalink(); ?>' />
    	<meta property='og:type' content='article' />
    	<meta property='fb:app_id' content='Your APP ID'>

    That might get you started anyway if you prefer to do it manually.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic