tags:

views:

3149

answers:

6

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.

A: 

facebook sharer use the description meta tag to add a description in your post for the pictures I don't really know how it works but I think it uses this tag in your header:

http://www.yourwebsite/dir1/dir2/picture.jpg' />

there's a probleme when sending html code in this board so here's the tag for the picture:<link rel='image_src' href='http://www.yourwebsite.com/dir1/dir2/picture.jpg' />
+10  A: 

The parameters that you can pass to the actual sharer.php are "u" and "t" which are title and url. 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.

Andrew Cox
A: 

the first answer is the correct you need put the image in metatags maybe you can use a variable for can change the image, i never tried already

A: 

My URLs are similar to that http://mysite.com/info-car But even when i use dynamically generated description and title facebook still get the one from the /index.php not from /info-car Can you help ?

T1000
A: 

Actually I have that same problem. I have the meta tags structured correctly under the head tag, but it seems to be pulling in older content, like it's cached or something. My site is MVC so there's a default.aspx but it's empty. The content is a page under my Views folder, of course.

I think i'll try putting a flat .html file in the root and see if it picks the meta tags up from there.

skindogg
A: 

Facebook caches this metainformation about pages. See this wiki page: http://wiki.developers.facebook.com/index.php/Talk:Fb:share-button#Cache_issues_with_Share.3F

Jarl