Suja Shyam
Suja Shyam

Reputation: 971

Facebook Like for each article on my asp.net website

I have a created a blog website using asp.net. In it I have a page BlogList which shows the list of blogs in the datalist. When clicked on each blog heading it navigate to the Article.aspx page. I need to include facebook plugin to like this article. For that what is to be done. Also I need to prompt user to like the facebook page if the user visits my website for the first time.

Upvotes: 0

Views: 204

Answers (1)

andyrandy
andyrandy

Reputation: 74004

There is a generator for the like button, get the basic code here and just change the URL:

https://developers.facebook.com/docs/reference/plugins/like/

You also need Open Graph tags on every page: http://ogp.me/

For the Facebook page, you cannot just prompt the user to like it (at least not without user authorization, and that´s way too complicated unneccessary just for this), you can only include another Social Plugin. The Like Box is perfect for this: https://developers.facebook.com/docs/reference/plugins/like-box/

Upvotes: 1

Related Questions