asp.net - How to implement the Facebook "Like" button for my website -


I'm trying to apply Facebook on my website as a button. The first four lines of code already exist on my site since the end of the "" tag.

To implement "Like button" I have added the second script (last row five) and run the application. This is giving me an error

" Microsoft JScript Runtime Error: '_OnLoad is not an object or object "

Please let me know thank you < / P>

  & lt; Script type = "text / javascript" src = "http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" & gt; & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; F.B.E.I.T. ("MyPK", "XD_recure HTM", {"reloaded eztioned switching": true}); & Lt; / Script & gt; & Lt; Script type = "text / javascript" & gt; Window.fbAsyncInit = function () {FB.init ({appId: 'myappid', position: true, cookie: true, xfbml: true}); }; (Function () {var e = document.createElement ('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document .getElementById ('FB-root'). AppendChild (e);} ()); & Lt; / Script & gt;  

Reference:

  & lt; Fb: such as href = "http://webclip.in" layout = "standard" show-faces = "true" width = "450" ​​action = "like" font = "aerial" colorsmem = "light" />  

A new way

Go to this page,

and add your parameters and create a code and click on "Get Code"

This is an example

  & lt; Iframe src = "http://www.facebook.com/plugins/likebox.php?id=185550966885&amp;width=292&amp;connections=10&ampstream = true & amp; header = true & amp; Height = 587 "scrolling =" no "frameborder =" 0 "style =" border: none; overflow: hidden; width: 292px; height: 587px; "allowTransparency =" true "& gt; & Lt; / Iframe & gt;  

Or simply (if you are using JavaScript's SDK in Facebook)

   & Lt; / Fb: as-box & gt;  

Also the page has a gate code ... it works, no need to add this javascript to your code.


Comments