简体   繁体   English

具有文本参数的Facebook sharer链接

[英]Facebook sharer link with text parameters

I want to include a link to a URL in a Facebook sharer link, like this one on the Boston Globe : http://www.bostonglobe.com/sports/2015/02/06/for-bruins-brad-marchand-agitation-occupation/zoswHyd3pX2yc1pKk5gOdO/story.html 我想在Facebook共享器链接中包含指向URL的链接,例如《 波士顿环球报》上的链接: http : //www.bostonglobe.com/sports/2015/02/06/for-bruins-brad-marchand-agitation -occupation / zoswHyd3pX2yc1pKk5gOdO / story.html

This is the code that I have, but it doesn't show the title: 这是我拥有的代码,但是没有显示标题:

<a aria-label="Share on Facebook" title="Share on Facebook" href="https://www.facebook.com/sharer/sharer.php?u=1http%3A%2F%2Fwww.affinnova.com%2Fconsumer-iq-test%2Fhome.html&t=Do+you+know+what+consumers+want?+Test+your+ability+to+predict+what+new+product+ideas+consumers+want?"
       onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=300,width=600');return false;"target="_blank" title="Share on Facebook">
    <img src="img/icon-facebook.png" alt="Facebook" />
</a>

The pop-up shows the title of the HTML page from the link and the url. 弹出窗口显示链接和URL中HTML页面的标题。 I'd like this to be more like what the Boston Globe link shows. 我希望这更像是《 波士顿环球报》链接显示的内容。 How can I do that? 我怎样才能做到这一点? Do I need an additional script? 我是否需要其他脚本?

https://www.facebook.com/share.php?u=google.com&quote=your+text+goes+here

I have been using this fro several years. 我已经使用了几年了。 Works fine thus far. 到目前为止工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM