A extend HTTP client for facebook graph API.
This package is part of a three package group :
- Facebook.AspNetCore.Extensions.DependencyInjection
- Facebook.NetCore.Service
- Facebook.NetCore.HttpClient
Download the following package from nuget.org :
Facebook.NetCore.HttpClient
FacebookHttpClient client = new FacebookHttpClient(version);
Where version
is the Facebook graph API version.
Exemple :
FacebookHttpClient client = new FacebookHttpClient("v6.0");
GetAsync(
string endpoint,
string accessToken,
IDictionary<string, string> args = null,
HttpCompletionOption options = default,
CancellationToken cancellationToken = default)
Where :
- endpoint: same as for the regular HttpClient.
- accessToken: the token to use. Can be a user, application, page token depending on the required type for the request.
- args: the different arguments to pass.
- options: same as for the regular HttpClient.
- cancellationToken: same as for the regular HttpClient.
PostAsync(
string endpoint,
HttpContent content,
string accessToken,
IDictionary<string, string> args = null,
System.Threading.CancellationToken cancellationToken = default)
Where :
- endpoint: same as for the regular HttpClient.
- content: same as for the regular HttpClient.
- accessToken: the token to use. Can be a user, application, page token depending on the required type for the request.
- args: the different arguments to pass.
- cancellationToken: same as for the regular HttpClient.