How to get an access token using C# SDK

后端 未结 6 743
难免孤独
难免孤独 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条回答
  •  生来不讨喜
    2020-12-05 17:06

    There is another method to make calls to the Graph API that doesn't require using a generated app access token. You can just pass your app id and app secret as the access_token parameter when you make a call:

    https://graph.facebook.com/endpoint?key=value&access_token=app_id|app_secret

    The choice to use a generated access token vs. this method depends on where you hide your app secret.

    From: https://developers.facebook.com/docs/facebook-login/access-tokens

    var client = new FacebookClient($"{appId}|{appSecret}");
    

提交回复
热议问题