Facebook sharer.php 是否更改为不再接受详细参数? [英] Has Facebook sharer.php changed to no longer accept detailed parameters?

查看:51
本文介绍了Facebook sharer.php 是否更改为不再接受详细参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们一直在打开一个共享弹出窗口(通过 window.open),其 URL 如下

https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][0]=示例

直到上个月左右的某个未知时间点,一切都很好.

现在发生的事情是;弹出对话框出现并正确包含查询字符串参数提供的标题、描述、图像和 URL,但是当提交帖子时,Facebook 上的结果墙帖子缺少标题、描述和图像,尽管它仍然链接到正确的网址.

有谁知道最近是否有可能突然停止工作的更改?

先发制人的一些常见反应:

  • sharer.php URL 已弃用" - 使用似乎仍在继续似乎一致认为它在很大程度上被认为是坚持 - 我没有看到任何具体的迹象表明它应该突然停止工作 - 可能错过了什么

  • 使用 JavaScript SDK/这些 OG 元标记" - 在我的特定情况下不可能情况 - 相信我......我可以解释如果你真的想要但是这真的不相关.

  • 使用提要对话框" - 由于缺乏对在FB页面上发布附件

解决方案

Facebook 不再支持 sharer.php

中的自定义参数<块引用>

共享者将不再接受自定义参数,而 facebook 将拉取预览中显示的信息相同它将作为来自 url OG meta 的帖子出现在 facebook 上的方式标签.

使用对话框/提要而不是 sharer.php

https://www.facebook.com/dialog/feed?app_id=145634995501895&display=popup&caption=An%20example%20caption&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fdialogs%2F&redirect_uri=https://developers.facebook.com/tools/explorer

来自 fb 团队的官方答复

We have been opening a sharing popup (via window.open) with the URL like

https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][0]=EXAMPLE 

and until some unknown point in the last month or so everything was fine.

What is happening now is; the popup dialog appears and correctly includes the Title, Description, Image and URL provided by the query string parameters, but when the post is submitted, the resulting wall post on Facebook is missing the Title, Description and Image, though it still links to the correct URL.

Does anyone know if there have been recent changes which could have suddenly stopped this from working?

Pre-empting some common responses:

  • "sharer.php URL was deprecated" - usage seemed to continue and it seemed the consensus was that it was largely considered to be sticking around - I haven't seen any specific indication that it should have suddenly ceased working - might have missed something

  • "Use JavaScript SDK/these OG meta tags" - not possible in my specific situation - just trust me ... I can explain if you REALLY want but it's really not relevant.

  • "Use the feed dialog" - not suitable due to lack of support for posting with attachments on FB pages

解决方案

Facebook no longer supports custom parameters in sharer.php

The sharer will no longer accept custom parameters and facebook will pull the information that is being displayed in the preview the same way that it would appear on facebook as a post from the url OG meta tags.

Use dialog/feeds instead of sharer.php

https://www.facebook.com/dialog/feed?
  app_id=145634995501895
  &display=popup&caption=An%20example%20caption 
  &link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2Fdialogs%2F
  &redirect_uri=https://developers.facebook.com/tools/explorer

Official answer from fb team

这篇关于Facebook sharer.php 是否更改为不再接受详细参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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