WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Share (New) Button
Share button and Like Button working together (2 posts)

  1. jonmrich
    Member
    Posted 4 years ago #

    Is it possible to have this share button work on the same page where the FB Like button is being used. I'm implementing that using XFBML and I've found something odd. When I try to also add the share button using your plugin (or any other that does the same thing), the Like button doesn't show up in Chrome or FF. However, in IE7 it does. Any ideas how to get these to work together on all browsers?

    Thanks,
    JMR

  2. ukneeq
    Member
    Posted 3 years ago #

    I actually had this same problem. I discovered that the new XFBML FB Like button is incompatible with the old FB Connect javascript. To fix it I had to use the XFBML version of the FB Share button. To do it all I did was edit the plugin and edit the file: facebookshare.php. I removed the following line from the function fb_generate_button():
    $button = '<div id="fb_share_1" style="'.get_option('fb_style').'"><a name="fb_share" type="'. get_fb_type() .'" share_url="'.$url.'" href="http://www.facebook.com/sharer.php">Share</a></div><div><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script></div>';
    and added:
    $button = '<div id="fb_share_1" style="'.get_option('fb_style').'"> <fb:share-button href="'.$url.'" type="'. get_fb_type() .'"></fb:share-button></div>';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic