Reputation: 604
I try to share url on facebook with title. I do
http://www.facebook.com/sharer/sharer.php?u=http://domain.com/win-a-hot-date/&t=Now this is awesome
but title doesn't show up. What's wrong?
Upvotes: 1
Views: 1918
Reputation: 139
The 't' url parameter has been deprecated as well as sharer.php
Herewith an example link that should work for you (always encode parameters values):
https://www.facebook.com/sharer/sharer.php?s=100&p[url]=http%3A%2F%2Fdomain.com%2Fwin-a-hot-date%2F&p[title]=Now+this+is+awesome
You could add these parameters to the end to show thumb images or summary:
&p[images][0]=*URL_TO_IMAGE*
&p[summary]=Some+urlencoded+summary
(it is normally advisable to replace all ampersands & with HTML's & equivalent)
Though, as stated above it's a deprecated api method and using the above can produce various outcomes i.e. sometimes images not there is support for it.
Some people reported problems with titles or images not shoeing and had to implement OG tags within their document's head tags in HTML code:
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description" content="Some descrioton"/>
NOTE: a new suggested by Facebook way is to use Feed and Share Dialogs described here. For debuging use this.
Upvotes: 1