1

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?

John Travolta
  • 604
  • 3
  • 9
  • 17
  • Sharer.php has been depreceated and may no longer work. Now the correct way to share a page is via a feed dialog. Suggestion don't use it as it'll probably be pulled completely soon – cjds Dec 05 '12 at 18:01

1 Answers1

1

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.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
webcoder
  • 129
  • 1
  • 10