I just "upgraded" to 6.1.0 of the c# SDK and found that the FacebookAuthClient has been removed. I checked the commit log on github and there's not much info there.
Does anyone know how you are supposed to authenticate with the latest version of the SDK?
prabir
It has been removed.
Starting with v6 you can now use it with normal FacebookClient.Get()
method. http://csharpsdk.org/docs/faq.html
How do I get a Facebook Application Access Token?
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 do I exchange code for 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 do I extend the expiry time of the access token?
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"
});
来源:https://stackoverflow.com/questions/9836042/where-did-facebookoauthclient-go