Support » Fixing WordPress » Error when sharing post on facebook

Viewing 1 replies (of 1 total)
  • 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:

    function fbs_click(u, t) {''+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
        return false;}

    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)

    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Error when sharing post on facebook’ is closed to new replies.