posting page title on the facebook when user clicks on like button in asp.net
I have a like button on my website, whenever I click on the like button, the information is posted on my facebook wall with proper url, but the issue is there is no proper page title, and image on the facebook wall, I want to customize this information. I mean I want to post the page title, coz my page title changes for every article, and 开发者_如何学运维also I want to post the image of the article on the facebook...
How can I post the customize information on the facebook on like button click.
You will need to include some open graph tags on your site in order to customize the title.
You would do this with
<meta property="og:title" content="My Title"/>
https://developers.facebook.com/docs/opengraph/
Make sure to include all the required tags (title, url, site_name, type, image) and to include the namespaces:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml">
Hope this helps.
精彩评论