Search code examples
c#winformsfacebook-comments

C# Windows Form display Facebook comments


i would like to add facebook plugin - comments into my c# application. (Not apply at asp.net) However, I am not able to put the generated HTML5 coding into the webBrowser in my program.

string fb_comments = "<html><body><div id=\"fb-root\"></div><script>....</script><form id=\"form1\" runat=\"server\"><div class=\"fb-comments\" data-href=\"https://www.facebook.com\" data-width=\"446\" data-num-posts=\"2\"></div></form></body></html>";
DisplayHtml(fb_comments);

Could you suggest any ways for me? Thanks


Solution

  • IMO you really don't want to use a WebBrowser to integrate with Facebook. They have an API that can be used. Here is a tutorial that will get you started getting connected to the API, then just leverage the API to get what you want.

    The spectrum of what you need is a bit broad because there is a lot more information that would be necessary, like API keys, and exactly what you're trying to access. But that will get you started.