Sunday, 8 March 2015

Facebook like Button Integration In Asp.net Using C#.Net

3/08/2015 - By Pranav Singh 0

In this article I will show you how you can integrate facebook like button in you asp.net application using c#.net.


So for this first we will go to the given developer facebook URL https://developers.facebook.com/docs/plugins/like-button/ . As you navigate the url you will get the below screen.




Now we will provide the like url.

Now for changing the like button look please check the below screen


After changing the layout your like button look as shown below.



Now click on code generate button to get like button code


Now in this we will add the generated code.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Facebook like button integration In Asp.net Using C#.Net</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <div id="fb-root"></div>
<script>    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=333340740099935&version=v2.0";
        fjs.parentNode.insertBefore(js, fjs);
    } (document, 'script', 'facebook-jssdk'));</script>
        <h2>Click to like me : </h2><div class="fb-like" data-href="http://www.aspdotnet-pools.com/" data-layout="box_count" data-action="like" data-show-faces="true" data-share="true"></div>
    </div>
    </form>
</body>
</html>

Now we have done. Run the application to check the output.


DOWNLOAD

About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top