Where did FacebookOAuthClient go?

I just โ€œupgradedโ€ to the 6.1.0 C # SDK and found that FacebookAuthClient was deleted. I checked the commit log on github and there is not much information there.

Does anyone know how you should authenticate with the latest SDK?

+7
source share
1 answer

He is deleted.

Starting with v6, you can now use it with the usual FacebookClient.Get() method. http://csharpsdk.org/docs/faq.html

How to get access token for Facebook applications?

 var fb = new FacebookClient(); dynamic result = fb.Get("oauth/access_token", new { client_id = "app_id", client_secret = "app_secret", grant_type = "client_credentials" }); 

How can I exchange the code for the access token?

 var fb = new FacebookClient(); dynamic result = fb.Get("oauth/access_token", new { client_id = "app_id", client_secret = "app_secret", redirect_uri = "http://yoururl.com/callback", code = "code" }); 

How to extend the access token expiration time?

 var fb = new FacebookClient(); dynamic result = fb.Get("oauth/access_token", new { client_id = "app_id", client_secret = "app_secret", grant_type = "fb_exchange_token", fb_exchange_token = "EXISTING_ACCESS_TOKEN" }); 
+24
source

All Articles