自 7 月 17 日起,旧的分享按钮在我管理的所有网站上都停止工作了。
我已经阅读了其他面临类似问题的用户的报告,但我找不到任何官方信息。
您知道是否有任何官方资源可用吗?
最佳答案
更新:
截至 2020 年 5 月,Facebook 文档未明确提及对 /sharer.php
URL 的支持,但 Share Button 生成的片段页面仍然引用该路径。
自从第一次提出这个问题以来已经过去了一段时间,但是来自 Facebook 文档的一些新信息让我们有可能看到一些官方“证据”,证明 sharer.php
共享链接的方法仍然有效, 仍然受到支持并且还活着。
引用是this page of the documentation并给出了一些例子:
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>
还有:
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 的文档中。
关于Facebook 分享按钮 : is it officially dead?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11537996/