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

Rama Sagar
Posted by in ASP.NET Web API category on for Beginner level | Points: 250 | Views : 7048 red flag
Rating: 4 out of 5  
 1 vote(s)

Facebook comment in WEB API


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


The objective of this article is to explain the steps of adding Facebook Comment 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 FacebookComment

  • Step 2 Select Web API and click OK


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


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

        Facebook comments

    <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-comments" data-href="/" data-numposts="5" data-colorscheme="light"></div>

Debug the Application and we can see the following output


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



Page copy protected against web site content infringement by Copyscape

About the Author

Rama Sagar
Full Name: RamaSagar Pulidindi
Member Level: Silver
Member Status: Member,MVP
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

Posted by: Sheonarayan on: 11/30/2013 | Points: 25
Good article Rama Sagar.
Posted by: Pari098 on: 7/29/2019 | Points: 25
If you find the all information about this windows documents http://documentswindows10.com that how would we find the documents in easiest way thanks for this all latest information.

Login to post response

Comment using Facebook(Author doesn't get notification)