Test your technical skills online, appear in Virtual Interview and be ready for job!
Twitter Twitter LinkedIn YouTube Google
Be Interview ready ! | Search
Make friends on DotNetFunda.com and expand your network!

Win Prizes

Like us on Facebook
Top Articles Author
Sun, 20-Apr-2014 Authors
All Time Authors

Latest members | More ...

(Statistics delayed by 5 minutes)

Learn How to Implement Facebook Follow button in Web API2 (Using Visual studio 2013)

Rama Sagar
Posted by under ASP.NET Web API category on for Beginner level | Points: 250 | Views : 1257 red flag
If you found plagiarised (copied) or inappropriate content,
please let us know the original source along with your correct email id (to communicate) for further action.

Facebook follow Button in WEB API


This article shows the walk through of how to Implement Facebook follow button to our web applications that using web API


The objective of this article is to explain the steps of adding Facebook Follow Button to our web applications

  • Step 1 Create a New Project Open visual studio 2013 -> click on File -> New Project -> Create new ASP.NET WebApplication -> Name it as FacebookFollow

  • Step 2 Select Web API and click OK


  • Step 4 Select the options as per your need and click on GetCode

            we will get the following code 

  • Step 5 Now go to our solution explorer expand views & Home folder and click on Index.cshtml  paste the generated code
        Facebook Follow button

    <div id="fb-root"></div>
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));</script>

    <div class="fb-follow" data-href="http://www.facebook.com/zuck" data-width="40" data-height="30" data-colorscheme="light" data-layout="standard" data-show-faces="true"></div>

Debug the Application and we can see the following output


In this article we have learned how to use Follow button of Facebook in a Web API project



Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:

About the Author

Rama Sagar

Full Name: RamaSagar Pulidindi
Member Level: Silver
Member Status: Member
Member Since: 12/30/2012 1:51:40 AM
Country: India

A Software Profesional working in Microsoft .NET technologies since year 2008, and I work for Dake ACE. I am passionate about .NET technology and love to contribute to the .NET community at Dot Net Funda
Login to vote for this post.

Comments or Responses

Login to post response.

Comments / Responses
Select text & click toolbar to format. Formatting appears in viewmode only. HTML Tags are not allowed.
Bold Italic Underline Paragraph Title Code  Link 
 Wait ... Processing ..... please wait.

Comment using Facebook