I have a business requirement to add a Share on Facebook button to a site. There are a lot of links on the web that point to this page but that just points to the page about
I believe it has been deprecated in favor of an improved Like button that has similar functionality. The language can be tweaked to 'Recommend', but I found these articles when doing similar research.
http://mashable.com/2011/02/27/facebook-like-button-takes-over-share-button-functionality/
http://visiblefactors.com/blog/994-facebook-likes-meta-data-thumbnails/
Hope it helps.
Using the Like button is probably the right way to go in most cases, but if you don't want to make an app id and want a simple quick method, just do this:
<a href="#" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=yoursite.com', 'sharer', 'width=626,height=436'); return false;">Share on Facebook</a>
You can replace the Share on Facebook with an image or whatever you want. Facebook docs reference: https://developers.facebook.com/docs/reference/plugins/share-links/
I don't know of any plans to deprecate the share bookmarklet (which is sharer.php
). The deprecation I think you're thinking of is the deprecation of the <fb:share>
tag, an XFBML tag which basically did the same thing as <fb:like>
before <fb:like>
came into existence. Now, they're redundant, so I think <fb:share>
is gradually being phased out.
2014: The sharer.php has been well..undeprecated. It figures, as this method has been used on millions of sites and was still being used even when the docs were previously saying that it was deprecated. Links in the old format will use the new share button functionality:
https://developers.facebook.com/docs/plugins/share-button/
This new Share Button works with a new version of our web-based Share Dialog. When using the sharer.php method of invoking the Share Dialog, this dialog will also display the new version without any changes required.
And:
Can I use the Share Dialog without using the Share Button? Yes, although we recommend using the Share button to offer the simplest and most consistent experience for people using your site, you can invoke the Share Dialog using a link:
Official word from Facebook on the sharer.php being deprecated and not supported: http://developers.facebook.com/docs/share/
The Share button has been deprecated in favor of the Like button, and will no longer be supported. Please use the Like button whenever possible to drive maximum traffic to your apps.
It is not deprecated per se, but we do want developers to move the Like button.