WordPress.org

Ready to get started?Download WordPress

Forums

Facebook sharing post URL instead of the homepage address! (15 posts)

  1. ideafaktory
    Member
    Posted 2 years ago #

    Hi, I'm really hoping someone can help me find a solution...have searched online for 3 hours with no luck. My Hosted WP 3.3 blog is sharing a specific post instead of the main URL. This happens whether I use FB itself, Sharethis or Hootsuite. Can anyone advise on how to resolve? The site is http://ideafaktory.com

    Thinking one of my plugins might be the culprit, but can't really tell. FB debugger gives a canonical URL scrape error, but it's like reading Aramaic. Here are the results, in case you know what it means: https://developers.facebook.com/tools/debug/og/object?q=www.ideafaktory.com

    Please let me know if you need additional info.

    Thanks so much for the help!!

  2. deepbevel
    Member
    Posted 2 years ago #

    If you only need a fb share for the whole site, and not specific items, you can use the code provided by facebook developer, just specify the url of the homepage:
    fbshare

  3. ideafaktory
    Member
    Posted 2 years ago #

    Thanks for the response. I am using very similar share code directly from FB to generate my Like widget. The link you sent seems to be a variation on that. It still doesn't solve the canonical issue identified in FB debugger. That still needs to be fixed somewhere on my WordPress. Even if someone isn't on my site and pastes my homepage URL in their FB share box, a link to a single post, instead of to the whole site comes up in the preview box. That is what I could use help with.

  4. deepbevel
    Member
    Posted 2 years ago #

    yikes, that's odd, I tried it on my fb wall, seems to always show that last post too "Five Ways Microsoft can Defeat iPhone and Android". Like it's forcing the last article on your home page blog. However it is your home page, but I imagine it should show your logo?
    There's never an option to select the thumnail either.

  5. ideafaktory
    Member
    Posted 2 years ago #

    Yes, it's the strangest error! Plus, that's not even the latest post. I've had many since then. Still, it should be defaulting to the main URL, not a post, even if it's recent. Has something to do with that debugger error. I just don't know how to apply a fix.

  6. deepbevel
    Member
    Posted 2 years ago #

    this is a tough one, not much info on it. I did find that someone fixed a similar problem (wouldn't show blog title) by changing their header.php meta to:
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

    Maybe worth a try.

  7. ideafaktory
    Member
    Posted 2 years ago #

    Thanks for looking into it! I'm reluctant to screw around with php files until I get an exact diagnosis. These band-aid solutions have a way of backfiring down the road.

  8. deepbevel
    Member
    Posted 2 years ago #

    As you wish, good luck to you :)

  9. branden.espinoza
    Member
    Posted 2 years ago #

    I'm having this same exact error. Tried pasting the http-equiv meta element, but to no avail. I'm creating a new post now, to see if it clears the problem.

  10. branden.espinoza
    Member
    Posted 2 years ago #

    Nope. That didn't fix it. Now it is just redirects to the new post, unlike ideafaktory. Any thoughts?

  11. branden.espinoza
    Member
    Posted 2 years ago #

    btw, here is my og code:

    `<meta property="og:title" content="<?php the_title(); ?>"/>
    <meta property="og:description" content="<?php
    if ( is_singular() ) { echo the_excerpt(); }
    else { print 'The Online Magazine for sailors looking for awesome stuff.';}
    ?>"/>
    <meta property="og:url" content="<?php echo the_permalink(); ?>"/>
    <meta property="og:image" content="<?php
    if (is_singular()) { wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), '', '' ); }
    else { echo "http://www.lazysheet.com/wp-content/uploads/2011/12/logoforfacebook.jpg";}
    ?>"/>
    <meta property="og:type" content="<?php
    if (is_singular()) { echo "article"; }
    else { echo "website";}
    ?>"/>
    <meta property="og:site_name" content="<?php bloginfo('name'); ?>"/>
    <meta property="fb:admins" content="17824777" />
    <meta property="fb:app_id" content="172336539528722" />`

  12. ideafaktory
    Member
    Posted 2 years ago #

    Follow-up to my prior post. I found the problem. It was due to the wrong data in the Facebook OpenGraph plugin, which I deleted and all works fine.

    The Yoast WordPress SEO plug-in seems to have similar functionality without the error.

    Hope that helps.

  13. deepbevel
    Member
    Posted 2 years ago #

    Good show, although I thought the fb developer code was producing the same problem, in fact when I pasted a link to your site in my fb page it showed the post url. Go figure.

  14. ideafaktory
    Member
    Posted 2 years ago #

    You're right!! That just happened! It was working Must be a new plugin I added. Looking into it now. It never ends. Never thought I'd say this, but I miss Blogger.

  15. dawnrae
    Member
    Posted 1 year ago #

    I have the same issue. I've checked my code. The debugger gives me the correct info, but clicking the share button gives me the recent post URL instead of the main page URL. Weird.

    Any further insight into fixing this issue?

Topic Closed

This topic has been closed to new replies.

About this Topic