kam*_*esh 22 html php facebook codeigniter facebook-sharer
题:
我需要在Facebook共享者URL中传递我的内容,如标题,摘要和图像,如下所示:
<a id="button"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=http://myurl.com/overview/sap-talent
&p[images][0]=http://myurl/images/my_image.png
&p[title]=mytitle
&p[summary]=containsummary">
Run Code Online (Sandbox Code Playgroud)
问题是它会自动从上面提到的URL(http://myurl.com/overview/sap-talent)获取一些内容,而且我不知道我的标题和摘要数据在哪里消失了.有没有其他方式来分享我的自定义标题,摘要和图像facebooksharer.php?
小智 30
看起来Facebook禁止将参数传递给共享者.
我们已经更改了sharer插件的行为,以便与我们平台上的其他插件和功能保持一致.
共享者将不再接受自定义参数,Facebook将以与在Facebook上显示的相同方式提取预览中显示的信息作为来自URL OG元标记的帖子.
这是帖子的URL:https://developers.facebook.com/x/bugs/357750474364812/
i--*_*i-- 18
这项工作目前(2016年10月),但我不能保证它会持续多久:
https://www.facebook.com/sharer.php?caption=[caption]&description=[description]&u=[website]&picture=[image-url]
Run Code Online (Sandbox Code Playgroud)
vla*_*ras 17
你现在唯一需要的参数是?u=<YOUR_URL>.所有其他数据将从页面或(更好)从打开的图形元标记中获取:
<meta property="og:url" content="http://www.nytimes.com/2015/02/19/arts/international/when-great-minds-dont-think-alike.html" />
<meta property="og:type" content="article" />
<meta property="og:title" content="When Great Minds Don’t Think Alike" />
<meta property="og:description" content="How much does culture influence creative thinking?" />
<meta property="og:image" content="http://static01.nyt.com/images/2015/02/19/arts/international/19iht-btnumbers19A/19iht-btnumbers19A-facebookJumbo-v2.jpg" />
Run Code Online (Sandbox Code Playgroud)
您可以在调试器中测试您的页面.
小智 13
似乎允许您注入自定义文本的唯一参数是“引用”。
https://www.facebook.com/sharer/sharer.php?u=THE_URL"e=THE_CUSTOM_TEXT
Run Code Online (Sandbox Code Playgroud)
小智 5
在Developers Bugs Facebook网站上,关于(parameters with sharer.php)的最后答案使我相信这是一个将要解决的bug。我对吗?
https://developers.facebook.com/x/bugs/357750474364812/
Ibrahim Faour · · Facebook Platform Team
Apologies for the inconvenience. We aim to update our external reports as soon as we get a resolution on issues. I do understand that sometimes the answer provided may not be satisfying, but we are eager to keep our platform as stable and efficient as possible. Thanks!