Facebook Share button: is it officially dead?

后端 未结 7 638
猫巷女王i
猫巷女王i 2020-12-04 21:51

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 abl

相关标签:
7条回答
  • 2020-12-04 22:30

    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.

    0 讨论(0)
  • 2020-12-04 22:32

    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?

    0 讨论(0)
  • 2020-12-04 22:32

    So to sum this up, it still works if you do this :

    <a target="_blank" style='text-decoration:none;' type="icon_link" href="http://www.facebook.com/sharer.php?u=URL-TO-SHARE-HERE"><img style="width:26px;height:26px;" src=".../facebook2.png"%>"/></a>
    

    It will open the share popup that will close itself once published.

    But everyone should move asap to the new "like" and "send" buttons...

    0 讨论(0)
  • 2020-12-04 22:51

    I think this seems to be a good future-safe compromise, as taken from the fb docs:

    Direct URL Example

    You can also bring up a Feed Dialog by explicitly directing people to the /dialog/feed endpoint:

    https://www.facebook.com/dialog/feed? app_id=458358780877780&
    link=https://developers.facebook.com/docs/reference/dialogs/&
    picture=http://fbrell.com/f8.jpg& name=Facebook%20Dialogs&
    caption=Reference%20Documentation&
    description=Using%20Dialogs%20to%20interact%20with%20users.&
    redirect_uri=https://mighty-lowlands-6381.herokuapp.com/

    You DO have to make an app to get an app ID to use in this method, but you DON'T have to get permission from the user before prompting them to post, and you can use any image you like.

    0 讨论(0)
  • 2020-12-04 22:52

    On 18 July Facebook released an update - all posts made to the page via external application now get a Share button. Previously people used a couple of hacks to add Share button themselves (using sharer.php) but this should be removed now as all posts made via an application automatically get a Share button.

    0 讨论(0)
  • 2020-12-04 22:52

    First they had deprecated the share button in favor of like button,(and though share continued working, as far as I experienced, it was buggy). But it seems, now (November 10, 2013) facebook lunched new share button, and it works fine again

    check these links

    https://developers.facebook.com/docs/plugins/share-button/

    https://developers.facebook.com/blog/post/2013/11/06/introducing-new-like-and-share-buttons/

    0 讨论(0)
提交回复
热议问题