Facebook分享按钮:是正式死吗? [英] Facebook Share button: is it officially dead?

查看:118
本文介绍了Facebook分享按钮:是正式死吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自7月17日起,旧的分享按钮停止了我所管理的所有网站的工作。

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?

推荐答案

有一段时间过去了,因为这是第一次但是Facebook的文档中提供了一些新的信息,使我们有可能看到一些官方的证明,即共享链接的 sharer.php 方法仍然有效,仍然得到支持活着和踢。

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>


还有:


您可以在新窗口或弹出窗口中指向此URL。如果您使用
JavaScript来弹出一个新窗口,您还可以参考
的URL作为location.href共享的当前页面。这给你代码
可以在所有页面上使用:

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');


总而言之,确实有一段时间的行为的 sharer.php 是不可预测的。被广泛接受的方法已被弃用,使用它是不明智的。 现在已经正式被打破了,因为将 sharer.php 的示例用法添加到了Facebook的文档。

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.

这篇关于Facebook分享按钮:是正式死吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆