How to get an access token using C# SDK

后端 未结 6 733
难免孤独
难免孤独 2020-12-05 16:43

I updated the Facebook SDK to 6.0.10 and some code that used to work is not working anymore. I used to post on users\' wall use the method below.

The class FacebookC

6条回答
  •  -上瘾入骨i
    2020-12-05 17:09

    You will need to get the app access token by making the request.

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

提交回复
热议问题