Facebook C # SDK Canvas Authorization

I have a Facebook iFrame app. I am using Facebook C # SDK libraries (version 6.0.10.0), Facebook and Facebook.Web (version 5.4.1.0).

How do I get some help from stackoverflow and some other sites SDK authorization problem in C # http://forum.ngnrs.com/index.php/topic,199.0.html

i is encoded as

 protected void Page_Load(object sender, EventArgs e)
    {
            fbApp = new FacebookApp();
            authorizer = new CanvasAuthorizer(fbApp);
            authorizer.Perms = requiredAppPermissions;
            if (authorizer.Authorize())
            {
                  //user authorized
            }
            else
            {
                  //user  not authorized
            }
    }

      

but in the line "authorizer = new CanvasAuthorizer (fbApp);" it gives ma a syntax error as error 14. The best overloaded method match for "Facebook.Web.CanvasAuthorizer.CanvasAuthorizer (Facebook.Web.FacebookWebContext)" contains some invalid arguments.

The Facebook C # SDK has no concept of changing syntax; Please, help?

+3


source to share


1 answer


For a Canvas app, Facebook sends a request to your canvas address that you specified in your app settings. In the post request, you will receive the signed_request parameter. All you have to do is parse this parameter using the Facebook API method and it will provide you with an access token that is used for further calls.

Here's a quick tutorial on the same. This was written with ASP.NET MVC 3.0 in mind. However, you can use most of the code for classic ASP.NET.



http://theocdcoder.com/tutorialcreate-a-facebook-canvas-app-using-asp-net-mvc-3/

0


source







All Articles