Posts Tagged ‘FaceBook Like button integration with your aspx page’

FaceBook users might have noticed the Like button which allows you to connect web pages & share them on Facebook.User logged into Facebook will see the profile pictures of friends who like the page & the number of “likes” for that particular page.

I have seen this integration of web pages with FB & have wondered how it works & made me take a deep dive into the ViewSource of one page & I figuered out the logic behind that

It’s very simple,the Like button can be added as a iframe to your aspx page.

<div align="center">
<iframe src=
scrolling="no" frameborder="0" style="background:#FFF; border:none; overflow:hidden; width:370px; height:300px;">

What matters is,the id which you see here “66386416740”. If you change it accordingly to your FaceBookPage,then you are done 🙂 Now,if you are curious how I figured out the id for the example page,it’s simple login to FB,Search for the page,from browser choose View Source,look for this below tag & get the id

<link rel="alternate" 
media="handheld" href="" 

You can read about iframe code & different parameters here:

Hope you enjoyed the post.Try integrating your sample aspx with your favourite FB page & let me know how it went 🙂