WordPress.org

Ready to get started?Download WordPress

Forums

Error when sharing post on facebook (2 posts)

  1. johndavin
    Member
    Posted 3 years ago #

    Problem:

    When I use a social plugin (sharethis or others)

    I get this when the facebook site comes up (NO TITLE/WRONG URL).

    What's on your mind?
    (No Title)
    http://http%3A%2F%2Fdogpicturesclub.com%...

    It does not always do the same thing! For example, it works to click on facebook share here.

    http://www.facebook.com/share.php?u=http%3A%2F%2Fdogpicturesclub.com%2F%3Fp%3D16&t=Dog%20Tricks%20from%20John%20and%20Alyssa%20and%20Trigger

    But it does not work on this site. What is the difference? Thank you.
    http://dogpicturesclub.com/?p=619

    I also tested it on a new WP install with no plugins, does the same thing.

    Thank you.
    John Davin

  2. achellios
    Member
    Posted 3 years ago #

    Facing the same problem. I'm building a custom Facebook button using the old share functionality (the new "Like" button seems to change frequently, and iframes are difficult to work with in tight spaces).

    I'm running WP 3.1 on a LNMP setup (Nginx instead of Apache), using the following script:

    <script>
    function fbs_click(u, t) {
        window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
        return false;}
    </script>

    Here's the actual link:

    <a rel="nofollow" href="#" onclick="return fbs_click('<?php the_permalink(); ?>', '<?php the_title(); ?>')" target="_blank">Like <img src="<?php bloginfo('stylesheet_director
    y'); ?>/images/facebook_16.png" width="16" height="16" alt="Facebook Icon"></a>

    A handful of posts will share correctly, but by and large the output on Facebook looks like this:

    (No Title)
    http://http%3A%2F%2Fthewebsite.com.

    I've noticed that for a split second, the title and permalink display properly--but then immediately snap to the above display.

    Any suggestions at all would be appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic