Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook sharer, pass in a comment?

Tags:

Is it possible to post a description/comment variable to the facebook sharer url? It's only possible for url and title as far as I can figure out.

like image 568
Kasper Avatar asked Dec 09 '08 17:12

Kasper


Video Answer


1 Answers

The parameters that you can pass to the actual sharer.php are "u" and "t" which are url and title. You can add meta tags to your page to get more info to appear in the sharer. To quote the docs (make sure you click the advance partners link):

In order to make sure that the preview is always correctly populated, you should add the tags shown below to your html. An example news story could have the following:

<meta name="title"        content="Smith hails 'unique' Wable legacy"> <meta name="description"        content="John Smith claims beautiful football ..." /> <link rel="image_src"        href="http://www.onjd.com/design05/images/PH2/WableAFC205.jpg" /> 

As shown, title contains the preview title, description contains the preview summary and image_src contains the preview image. Please make sure that none of the content fields contain any html markup because it will be stripped out. For consistency's sake, please use the <meta> tag to provide text data for the preview, and the <link> tag for any source urls.

The title and summary tags are the minimum requirements for any preview, so make sure to include these two.

like image 149
Andrew Cox Avatar answered Oct 23 '22 09:10

Andrew Cox