admin管理员组文章数量:1355008
I want to include a link to a URL in a Facebook sharer link, like this one on the Boston Globe: .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=".php?u=1http%3A%2F%2Fwww.affinnova%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. 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?
I want to include a link to a URL in a Facebook sharer link, like this one on the Boston Globe: http://www.bostonglobe./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./sharer/sharer.php?u=1http%3A%2F%2Fwww.affinnova.%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. 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?
Share Improve this question edited Feb 6, 2015 at 15:34 DLeh 24.4k17 gold badges95 silver badges141 bronze badges asked Feb 6, 2015 at 15:14 user2148348user2148348 231 gold badge1 silver badge4 bronze badges2 Answers
Reset to default 7https://www.facebook./share.php?u=google."e=your+text+goes+here
I have been using this fro several years. Works fine thus far.
My friend, sharer.php is deprecated. http://www.joshuawinn./facebooks-sharer-php-longer-deprecated-2014/
Use dialogs instead. https://developers.facebook./docs/sharing/reference/feed-dialog/v2.2?locale=es_LA
Good luck!
本文标签: javascriptFacebook sharer link with text parametersStack Overflow
版权声明:本文标题:javascript - Facebook sharer link with text parameters - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743952633a2567566.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论