Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Facebook comments URL issue

  • 13-09-2011 7:42pm
    #1
    Closed Accounts Posts: 1,017 ✭✭✭


    I'm trying to use the Facebook comments plugin, I've put the following code in my comments.php Wordpress file and it's appearing but I'm getting an error "Warning: http://www.url.co.uk/blog/� is unreachable.". Is it searching for a URL with a "�" at the end of it? (If so, how do I correct that?)

    I noticed the problem when someone commented on a blog post and it posted it on their Facebook page and the link doesn't work that's posted as their status (as it has a � on the end of the URL.)

    I've searched for solutions online but nothing has worked, it would be great if someone could help, thanks.

    I'm using the following code:
    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script&gt;
    <meta property="fb:app_id" content="APP-ID">
    <fb:comments href=”<?php echo get_permalink($post->ID); ?>” num_posts="5" width="950">
    <meta property="fb:admins" content="USER-ID"/>
    </fb:comments>


    Hope this is the right area for this, if it isn't if a mod could move it please :)


Comments

  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    Just be careful about the info you post. I can identify you and your site from the data that you posted above.

    Nice photo by the way!

    I see the error that you are talking about.

    Can I suggest that you use Open Graph tag on your site. It will certainly make any links posted back into Facebook look far more attractive. It may also help the situation. Useful how-to guide here

    Have you all the fields completed in the app itself?


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    I was reading elsewhere and here's a suggestion. They are recommending that this goes in header.php (or the file that contains the HEAD info)

    <meta property="fb:app_id" content="yourappidgoeshere">
    <meta property="og:title" content="<?php wp_title('', true); ?>"/>
    <meta property="og:type" content="article"/>
    <meta property="og:site_name" content="yoursitename"/>

    This script needs to go in the HEAD

    <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script&gt;

    Then you open single.php (or the template file you use to display blog entries with) and replace:


    <?php comments_template(); ?>

    with this:

    <div id="fb-root"></div><fb:comments href="<?php the_permalink(); ?>" num_posts="5" width="950"></fb:comments>

    The above info seems to current at May of this year. If it breaks your site don't blame me! :)


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    Thanks, I'll take a look at that and give it a go!


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    That's got rid of the url error below the box at least, still no luck with the moderation tool though! (Nothing is appearing in public comments even for comments which have been published.)


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    I would also add in these lines in the header.php

    <meta property="fb:admins" content="USER-ID"/>
    <meta property="og:image" content="LINK TO A 75 x 75 IMAGE FOR YOUR SITE"/>

    That 75x75 image would be say the logo for your site (The image can be anything from 50x50 pixels upwards).


  • Advertisement
  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    That's got rid of the url error below the box at least, still no luck with the moderation tool though! (Nothing is appearing in public comments even for comments which have been published.)

    Have you tried going here: http://developers.facebook.com/tools/comments


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    BrianD wrote: »

    Yes, that's where I'm trying to review them. I've done a few print screens below of how things are looking (with details removed).

    unled1xx.jpg
    unled2ap.jpg
    unled3du.jpg


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    I see that you must have reverted to your original code.

    I can see my post there but your error is still there.

    If you click on the link it brings you to the following data that it says is missing:

    Required Property Missing:
    og:title is required.
    og:type is required.
    og:url is required.
    og:image is required.
    fb:app_id is required.

    The Like Plugin will only generate one-line stories unless this property is provided. Comments works on the same basis it seems.

    For some reason, FB is unable to get the above info from your site.

    In a Joomla site I run, I have the above info embedded in the overall meta data for the page along with the fb:admins and fb:app_id.


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    Might be worthwhile to see if there's a WP plug in that you can install. This will allow you just enter the data you need and do the code for you.

    Also if possible I'd get rid of this out of your header

    <meta name="generator" content="WordPress 3.2.1" />

    as it identifie syour site as a WP site.


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    Yeah, I decided to go back to the original version while I sort. I actually tried this plugin which got rid of the URL error, but still didn't get the moderation working. (It also removed the comments that were left on the original, is it possible to move these? I'd have thought they would have stayed as the app ID was the same?)


  • Advertisement
  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    I still see the error message on the page below the comments box.

    Recommend that you get all the OG data in place.


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    Fixed! Turned out it needed the og data for it to work, unfortunately it removed all my old comments I had but at least it works this way. Thanks for all the help BD!


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    I'm seeing the comments box twice on the blog pages.


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    BrianD wrote: »
    I'm seeing the comments box twice on the blog pages.

    Just removing those now, they were the original ones I placed into the post code so having to go through each post and delete it.


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    Quick question, do you have any control of the image that is displaying in my posting on Facebook? Or is it pot luck?


  • Closed Accounts Posts: 1,017 ✭✭✭the_doctor199


    BrianD wrote: »
    Quick question, do you have any control of the image that is displaying in my posting on Facebook? Or is it pot luck?

    Pot luck I believe.


  • Closed Accounts Posts: 7,221 ✭✭✭BrianD


    You gan use the OG:image tag to control what image will be displayed.

    In your case the "pot luck" method works. I had another site where it selected an Amazon logo as the OG image. Had to preset it to a brand logo.


Advertisement