Facebook and facebook login integration C # SDK - NOT facebook application

I downloaded the samples and the 5.0.3 beta version of the SDK, and pretty quickly got the facebook application and launched inside facebook - great and super easy.

However, I want to use facebook only as an authorization mechanism, and I cannot figure out how to do this from the examples and documentation (in fact, I could not find any documentation, except for a few examples here and there).

I found this piece of code without context here: Link

protected void Page_Load(object sender, EventArgs e)
{
    if (!authorizer.IsAuthorized())
    {
        var authurl = authorizer.GetLoginUrl(new HttpRequestWrapper(Request));
        CanvasRedirect(authurl.ToString());
    }
    else
    {
        LoggedIn(); // function to call when the user is logged in to init the page
    }
}

It looks really interesting, but I can’t understand what the creator is and uses it.

I use MVC 3, but that doesn't really matter.

Can C # sdk be used for this facebook - and how?

+3
source share
3 answers

It seems that you solved your problem, but in case someone came across this question - I found this new library quite easy to understand from the code:

OAuth2Login on GitHub

There is also a fairly detailed article that explains the library:

OAuth2 Social Logins - Facebook, Google, Twitter, PayPal - ASP.NET MVC C # Open Source

0
source

Source: https://habr.com/ru/post/1793170/


All Articles