Facebook SDK (C# Graph API Client) for Facebook Graph API
Target: .NET Standard 2.0
Integration tests target: .NET Core 3.1
GraphApi.Facebook.Client - only prerelease version available
You need to add Facebook section to your JSON configuration file with your ClientId and ClientSecret:
{
"Facebook": {
"AppId": "168859494420616",
"Secret": "36fe14d2c7a4e22f3e9ad9d436883518",
"TestUserId": "101298791447225"
}
}
In your dependency injection setup add Facebook client initialization code:
ServiceProvider = new ServiceCollection()
.AddFacebookClient(options => config.GetSection("Facebook").Bind(options))
.BuildServiceProvider();
The library support operation with application and user tokens (get, convert, debug) and can query basic information about the user.
You can use IAccessTokenFbService or IDebugTokenFbService for token operations.
IUserFbService - get information about the user.
ITestUserFbService - service for Test Users