user2148348
user2148348

Reputation: 23

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

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. 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?

Upvotes: 2

Views: 11243

Answers (2)

Rossitten
Rossitten

Reputation: 1166

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.

Upvotes: 7

Related Questions