Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Share button: is it officially dead?

Since July 17 the old share button stopped working on all the websites I manage.

I've read reports by other users that are facing similar issues, but I was not able to find anything official.

Do you know if there is any official source available for this?

like image 569
Scalax Avatar asked Jul 18 '12 09:07

Scalax


People also ask

What happened to the share button on Facebook?

Ok, so apparently FB has updated their privacy settings... For those of you seeing the "Share" option in your posts... That means that post is open to the public to see. If you have your profile settings set to "Friends", then no one will be able to share your posts.

Did Facebook Change the share button?

That's right, Facebook appears to be running a test which would see the 'Share' button removed from News Feed posts, replaced with a 'Message' button instead. The new format would likely see a reduction in public post sharing, further shrinking already low organic reach numbers.

When did Facebook get a share button?

ever since being introduced by facebook in 2010, the like and share buttons have received over 22 billion clicks daily, across more than 7.5 million websites around the world.


3 Answers

Update: As of May 2020, the Facebook documentation doesn't explicitly mention support for /sharer.php URLs, but the snippets generated by Share Button page still refer to that path.


Some time has past since this first was asked but some new information from the Facebook documentation has given us the possibility to see some official "proof" that the sharer.php method of sharing links still works, is still supported and is alive and kicking.

The reference is this page of the documentation and a few examples are also given:

This is what the simplest use of the share dialog looks like:

<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
  Share on Facebook
</a>

And also:

You can point to this URL in a new window or a popup. If you use JavaScript to pop open a new window, you can also refer to the URL of the current page being shared as location.href. That gives you code you can use on all pages:

var sharer = "https://www.facebook.com/sharer/sharer.php?u=";
window.open(sharer + location.href, 'sharer', 'width=626,height=436');

To summarize, there was indeed a period of time when the behavior of the sharer.php was unpredictable. It was widely accepted that the method had been deprecated and that it was not wise to use it. This has now officially been busted as an example usage of sharer.php was added to Facebook's documentation.

like image 171
Lix Avatar answered Oct 11 '22 15:10

Lix


UPDATE #3 (June 2016):

It's gone again: There are no more references to the sharer.php in the documentation. Though you have the option to use the share dialog without integrating with the facebook sdk in any form. An important difference is the required app_id parameter. Here is one example from the docs:

<a id="facebook" href="https://www.facebook.com/dialog/share?app_id=145634995501895&display=popup&href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https%3A%2F%2Fdevelopers.facebook.com%2Ftools%2Fexplorer" target="_blank">share me</a>

UPDATE #2:

See @Lix's answer.


UPDATE #1:

As Sean pointed out (for this credit to him) you can use the FBML version of the share button. A code snippet for the FBML version:

<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#" lang="en" style="overflow:hidden;">
    <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
        <meta charset="utf-8">
        <title>Test</title>
    </head>
    <body>
        <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="button_count" href="http://www.foobar.com">
        </fb:share-button>
    </body>
</html>

NOTE: This version of the share button (like all current social plugins by Facebook) creates a cookie with the datr parameter which is a potential threat to user privacy. You should keep this in mind if you must follow privacy policies.

A code snippet for the sharer.php version:

<a id="fb-share" style='text-decoration:none;' type="icon_link" onClick="window.open('http://www.facebook.com/sharer.php?s=100&amp;p[title]=foo&amp;p[summary]=bar&amp;p[url]=https://www.foobar.com/&amp;p[images][0]=https://www.foobar.com/thumb.gif','sharer','toolbar=0,status=0,width=580,height=325');" href="javascript: void(0)">
    <img src="img/share.gif" width="62" height="18" alt="Share"/>
</a>



ORIGINAL ANSWER:

The Share Button has been deprecated already a while ago. It might be dead completely now, or just temporarily, only Facebook knows. Officially it is deprecated.

From the documentation:

What happened to the old Share button?

We deprecated the Share Button when we launched the Like button [...]

like image 34
borisdiakur Avatar answered Oct 11 '22 13:10

borisdiakur


The code used here,

<a name="fb_share" type="button_count" share_url="..." href="facebook.com/sharer.php" rel="nofollow">Share</a>

<script src="static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>

was deprecated several years ago, and Facebook switched to serving the new JS SDK in its place on Monday.

The official version of the share button is to use the JS SDK and to use

<fb:share ..... />

That said, we are now serving the new SDK in it's place, and I plan on bringing the old <a name="fb_share" ... tag back to life today :) Sorry about this.

But maybe time to update to the new SDK?

like image 7
Sean Kinsey Avatar answered Oct 11 '22 13:10

Sean Kinsey