Which is the right way to setup Facebook comments

Hi.

I have removed the standard wp comments and use the Facebook connect comments instead.

Comments made on facebook is imported the right way, I can see them perfectly in the wp-admin, but they are not displayed on the site.

So what is the right way to setup the plugin if you want to use facebook comments, but do not want to allow wp comments, but still wan't to show the comments made on facebook?

Kind Regards

Henrik

  • Jack Kitterhing

    Hi there Henrik,

    Hope you're well today and thanks for your question.

    WordPress comments should be enabled, then in Ultimate Facebook > settings > Facebook comments, check the boxes for Use Facebook for comments and for "Override WordPress discussion settings".

    The comments should show then, if not, this is going to be a issue with the hook your theme uses for comments, which theme are you using? :slight_smile:

    Thanks!

    Kind Regards
    Jack.

  • henrik_gregersen

    The theme is a theme which I have customized very much by now.

    But the theme uses the comments_template() function to show the comments section.

    But that did not work with the ultimate facebook plugin, so in order to be able to show the facebook comments I removed the comments_template() call and inserted a do_action("<code setup in the plugin>")

    That displayed the facebook comments box but it does not show the commets made on facebook, which are actually imported in wordpress from facebook.
    Only the new comments facebook box is displayed.

    Is there a better way to do this?

  • Jack Kitterhing

    Hi there @henrik_gregersen,

    Hope you're well today and thanks for the additional information.

    comments_template() call and inserted a do_action("<code setup in the plugin>")

    That displayed the facebook comments box but it does not show the commets made on facebook, which are actually imported in wordpress from facebook.
    Only the new comments facebook box is displayed.

    That should be working with the comments imported, so the comments are imported successfully but they just don't display?

    Is there anything in Ultimate Facebook > error log?

    Thank you!

    Kind Regards
    Jack.

  • henrik_gregersen

    Hi Jack

    There is no data in the error log that can explain why the comments are not shown, but maybe I should explain a little about this specific post.

    I did not post this post on facebook using the auto post feature, because I have discovered that auto posts gets ignored by facebook

    I have made 2 autoposts, and they both only reached 1 person.
    Then I made a manual post on the page for this article and it reached 58 persons. (I have a total of 127 likes on my facebook page)

    So the auto post on facebook does not work well, and I have infact created a feature request for changes to this behaviour.

    So I made a manual post on my facebook page and a manual post in a group in which I am a regular member.

    But I found that even comments made on the post in the group was actually imported in wordpress, which is great, but they are not displayed on the site.

    So to test this, I made a comment on the blog post directly from the facebook comments box, in hope that it will be able to post my comment back to the commets on the group on facebook.

    But It did not do that, but it created this entry in the error log

    get_feed_for exception The user must be an administrator of the page in order to impersonate it.

    In other words it is unable to post back to the group where the comments are imported from.

    But the one comment which I made on the blog post facebook comment box is only shown on the post and not as a reply to the original comments made on the facebook group.

    See this screenshot for clarity.

    Screenshot

  • Jack Kitterhing

    Hi there @henrik_gregersen,

    Hope you're well today and thanks for the additional information and the screenshots, much appreciated :slight_smile:

    The hook you called, did you call that in comments.php?

    I spoke with the lead developer about this and he said if you can send FTP to me, He can fix the files for you so the comments work :slight_smile:

    If you could send to contact(at)wpmudev.org with the subject line Attn: Jack Kitterhing

    Thanks!

    Kind Regards
    Jack.

  • henrik_gregersen

    Hi Jack

    Thank you for your offer to ftp to the site, but I do not have ftp access. It is a self hosted server and I have on purpose not configured any ftp access Sorry :slight_smile:

    But here is the code used int the them that inserts the comment section.

    BTW: I am a developer my self, so if your developer needs to get a little more specific, please let him join this communication.

    Here is the code in single.php

    <div class="clr"></div>
    
    						<?php
    						/* Kameragrej.dk
    						 * Removed comments_template() and replaced with do_action.
    						 * Compare this file with the single.php file in the classipress theme folder.
    						*/
    						?>
                            <?php //comments_template(); ?>
    
                            <?php do_action("kgdk_fb_comments");?>
  • Vladislav

    Hello,

    Actually, in order to have both the imported comments and the Facebook ones, we do need to have the comments_template() call in the single.php and do some further edits in the comments.php - that's the file that will be used to render comments by default. The hook code you added to single.php can be then moved to the comments.php, but we also need to check and make sure that the comments loop isn't being skipped when the default comments are disabled - we do want to skip the comments posting form though, as we'll be using the Facebook comments instead. This is because the imported comments (the ones imported from Facebook) are, as far as WordPress is concerned, pretty much regular old WP comments. However, the Facebook comments (i.e. the ones made on your site via the Facebook comments form) are a whole different thing. If you have any issues bringing this together yourself, I'd be happy to have a look into code, if you could pass us the comments.php for your theme.

  • henrik_gregersen

    Hi Vladislav

    So is it right that what you are suggesting is that I should list the imported wordpress comments as regular commetns, but disable the comments form and instead insert the hook for the facebook comments form?

    I took a look at the comments.php file and it is quite different than the "standard" TwentyForteen comments.php file, because the theme developer has added a different structure. But I can mannage to change this if I just understand the right way to implement the facebook part.

    So do I understand you correct, that imported comments are regular wordpress comments and are displayed as if they were regular wordpress comments, and in a layout specific to the theme as if it did not use facebook comments at all?

    And the comments created on the post, will be displayed in the facebook layout way, but they will not be shown on the facebook page post, only on my site?

    And there are no way to get the comments created on the site go back to facebook so it does not matter if users post on my site or on facebook?

    If this is correct, then what I have to do is to remove the wordpress comment form in comments.php and insert the facebook hook, but it will only display the comments on my site, not create a two way sync between facebook and my site.

    Is this correct?

    If Yes, then I know what to do about it, but I would prefere that I could sync the comments back to facebook or people might end up comment on a comment and don't understand why they do not receive an answer.

    Kind Regards

    Henrik

  • Vladislav

    Hello,

    Yes, you're exactly right. The two are different, and the imported comments will basically be the ones that got posted on your/your page's wall article that the plugin auto-posted when you published your post (I realize this may sound a bit disorienting, but I really hope it isn't). The comments made by the Facebook comments on your site will, however, belong to the post on your site. So, the imported ones will show (and, for the most part - such as administration) be treated as regular WP comments once they hit your site. The Facebook comments are different, and you'll have to use the Facebook comments moderation tool to administer them.

  • henrik_gregersen

    Hi Vladislav

    Ok I have managed to make some changes that shows the imported comments as "Created on facebook" and have removed the comments form so they are only able to comment on the post via facebook comment.

    But it is not that great.

    The theme shows the number of comments to an article, using the wordpress standard function comments_popup_link(), but this only counts the wordpress comments, and not the number of commetns created in the facebook comment form.

    Is there any way you can alter this, so it includes a total of comments or at least take the facebook comments count into consideration.?

  • henrik_gregersen

    Hi Jack

    I came to the same conclusion, however it is not really great because other plugins that shows comment counts etc in widgets will not work well then.

    But I guess You can't have it both ways, so I will change my theme, and hope that there will be a future update of the plugin that actually implements the comment part just a little better.

    Thanks for your assistance.

    Henrik

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.