Skip to content

pedro-de-rycker/Facebook.NetCore.HttpClient

Repository files navigation

Facebook.NetCore.HttpClient

A extend HTTP client for facebook graph API.

This package is part of a three package group :

Get started

Download the following package from nuget.org :

Facebook.NetCore.HttpClient

Constructor : FacebookHttpClient(string version)

FacebookHttpClient client = new FacebookHttpClient(version);

Where version is the Facebook graph API version.

Exemple :

FacebookHttpClient client = new FacebookHttpClient("v6.0");

Extended methods

GetAsync

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

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.

About

A simple .NET Core 3 http client for Facebook

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages