Afriwap.com

Internet Biz / Webmasters => Wap & web script => Topic started by: Timi Dapsin on December 19, 2013, 03:14:56 AM

Title: Has your Facebook Share button Stopped Working? Fix it now
Post by: Timi Dapsin on December 19, 2013, 03:14:56 AM
 Facebook officially deprecated the share button in favor of the like button earlier this year. A few days ago, I realized that the share button no longer displays on sites I manage. Trying to figure out what could be wrong, I checked those sites using a different browser and it was the same. Still in doubt, I used a different PC and even checked other websites just to be sure.
Across the web, a certain version of Facebook share button stopped working. The Share Button has been deprecated already a while ago but not yet completely d*ad. If it stops working on your website or blog, you only need to update your code.
Facebook deprecated the Share button on February 28, which means they no longer recommend its use in applications or on external web sites. Also, a certain version of Facebook share button was deprecated several years ago, and Facebook switched to serving the new JS SDK in its place on Monday, July 16. Perhaps the old one will be brought back to life later, but then I guess it’s time to upgrade to the new version. Support has already been dropped for it so there’s no point complaining to Facebook.
 How to fix your share button I prefer using the share button because it lets me share to my fan pages, unlike the like button which Facebook now favors. I found three fixes to this which I think should do the trick.
 
 1. Using the official JD SDK version - Search for <html, leave a space and add xmlns:fb=”http://ogp.me/ns/fb#” just after it. The resulting code should lok like this:
 
Code: [Select]
<html xmlns:fb="http://ogp.me/ns/fb#" If this is already there, you don’t need to do it again.
- In the body of your website where you want the code to display, paste this:
 
Code: [Select]
<div id="fb-root"></div>
 <script>(function(d, s, id) {
 var js, fjs = d.getElementsByTagName(s)[0];
 if (d.getElementById(id)) return;
 js = d.createElement(s); js.id = id;
 js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=YOUR_APP_ID"; // appId must be valid
 fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'facebook-jssdk'));</script>
 <fb:share-button type="box_count">
 </fb:share-button>
 
 Hey, make sure you change these parameters for the code to work:
 *** YOUR_APP_ID – You must create a facebook application (https://developers.facebook.com/apps) for this code to work.

*** You can change box_count to button_count if you want a smaller button instead of the large one with counter.
  You can use the demo above to see its perfectly working, you only need to follow the steps and do it right.
 
 2. Using Sharethis button If you don’t want to mess around with these codes and just need a quick way to get it done, you can consider using Sharethis share buttons (http://www.sharethis.com). I think they have a plugin for WordPress and if you’re adding it to your website, you’re allowed to customize the look and feel of the button before generating the code.
Implementing the code isn’t that hard either, you only need to place the right code in the head section and the other one in the body section where you want the share button to appear. See the share buttons displayed below this post? It’s from Sharethis.
 
 3. Using the share bookmarklet If you don’t own a website and only need a way to share any page on Facebook real fast, this is just what you need. Even if the page doesn’t have a share button, you can still share it anyway as you just need to install the share button on your browser.
   
(https://s-static.ak.facebook.com/rsrc.php/v2/yV/r/A9yKVxlTDKN.gif)
  Drag me to your Bookmarks Bar to quickly share any web page with your friends, even when you’re not on Facebook.
  If you can’t see the Bookmarks Bar, Choose “Show Bookmarks Bar” from the View menu.
   
(http://cdn.doncaprio.com/wp-content/uploads/2012/07/facebook_share_button.png)
  After you drag the button to the Bookmarks Bar, it will look like this.
    Either of these three fixes should get you sharing on Facebook again. Personally, I prefer it to the like button and I wish it’s not being deprecated.