Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have implemented facebook share functionality with very basic code. But it does not display Image and title along with Link. I want to display custom title and images. My code is as below:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
<meta name="title" content="This is the Title" />
<meta name="description" content="This is a short summary of the page." />
<link rel="image_src" href="http://www.murrayhilltech.com/images/LogoColorNoText.jpg" />

Please help me.

Thanks
Posted
Updated 28-Jul-11 21:32pm
v4

1 solution

Hi,

Facebook does no more actively support the Share button. It should still work, but should no more be used in new projects.

So the replacement for the Share Button is the Like-Button:
https://developers.facebook.com/docs/reference/plugins/like/[^]

To implement a Like-Button, you just have to add the following to your page:

HTML
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like href="http://www.codeproject.com/" send="true" width="450" show_faces="true" font=""></fb:like>


This code was directly copied from the above link, the page can generate the code for you.

Hope this helps.

Best regards and happy coding,
Stops
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900