C# Class Facebook.FacebookClient

Afficher le fichier Open project: liquidboy/X Class Usage Examples

Private Properties

Свойство Type Description
Base64UrlDecode byte[]
BatchAsync void
BatchAsync void
BatchAsync void
BuildHttpQuery string
ComputeHmacSha1Hash byte[]
ComputeHmacSha256Hash byte[]
FacebookClient System
GetException System.Exception
ParseDialogCallbackUrl object
ParseOAuthCallbackUrl FacebookOAuthResult
ParseSignedRequest object
ParseUrlQueryString string
ParseUrlQueryString string
PrepareBatchRequest object
PrepareRequest HttpHelper
ProcessBatchResponse object
ProcessResponse object
SerializeParameters void
SetDefaultJsonSerializers void
SetJsonSerializers void
ToDictionary object>.IDictionary
TryParseOAuthCallbackUrl bool
TryParseSignedRequest bool
TryParseSignedRequest bool

Méthodes publiques

Méthode Description
Batch ( ) : object

Makes a batch request to the Facebook server.

Batch ( FacebookBatchParameter batchParameters, object parameters ) : object

Makes a batch request to the Facebook server.

BatchTaskAsync ( ) : Task

Makes an asynchronous batch request to the Facebook server.

BatchTaskAsync ( FacebookBatchParameter batchParameters, object userToken, CancellationToken cancellationToken ) : Task
BatchTaskAsync ( FacebookBatchParameter batchParameters, object userState, CancellationToken cancellationToken, System uploadProgress ) : Task

Makes an asynchronous batch request to the Facebook server.

BatchTaskAsync ( FacebookBatchParameter batchParameters, object userToken, object parameters, CancellationToken cancellationToken ) : Task
BatchTaskAsync ( FacebookBatchParameter batchParameters, object userState, object parameters, CancellationToken cancellationToken, System uploadProgress ) : Task

Makes an asynchronous batch request to the Facebook server.

FacebookClient ( string accessToken ) : System

Initializes a new instance of the FacebookClient class.

GetDialogUrl ( string dialog, object parameters ) : Uri

Gets the Facebook dialog url.

GetLoginUrl ( object parameters ) : Uri

Gets the Facebook OAuth login url.

GetLogoutUrl ( object parameters ) : Uri

Gets the Facebook OAuth logout url.

ParseSignedRequest ( string signedRequestValue ) : object

Parse the facebook signed_request.

SetDefaultHttpWebRequestFactory ( HttpWebRequestWrapper>.Func httpWebRequestFactory ) : void

Sets the default http web request factory.

SetHttpWebRequestFactory ( HttpWebRequestWrapper>.Func httpWebRequestFactory ) : void

Sets the http web request factory for the current instance of FacebookClient.

VerifyGetSubscription ( string requestHubMode, string requestVerifyToken, string requestHubChallenge ) : void

Verify HTTP_X_HUB_SIGNATURE for HTTP GET.

VerifyGetSubscription ( string requestHubMode, string requestVerifyToken, string requestHubChallenge, string verifyToken ) : void

Verify HTTP_X_HUB_SIGNATURE for HTTP GET.

VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody ) : object

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.

VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, Type resultType ) : object

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.

VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, Type resultType, string appSecret ) : object

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.

VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, string appSecret ) : object

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.

Private Methods

Méthode Description
Base64UrlDecode ( string base64UrlSafeString ) : byte[]

Base64 Url decode.

BatchAsync ( FacebookBatchParameter batchParameters ) : void
BatchAsync ( FacebookBatchParameter batchParameters, object userState ) : void
BatchAsync ( FacebookBatchParameter batchParameters, object userState, object parameters ) : void
BuildHttpQuery ( object parameter, string>.Func encode ) : string
ComputeHmacSha1Hash ( byte data, byte key ) : byte[]
ComputeHmacSha256Hash ( byte data, byte key ) : byte[]

Computes the Hmac Sha 256 Hash.

FacebookClient ( ) : System

Initializes a new instance of the FacebookClient class.

GetException ( HttpHelper httpHelper, object result ) : Exception
ParseDialogCallbackUrl ( Uri uri ) : object
ParseOAuthCallbackUrl ( Uri uri ) : FacebookOAuthResult
ParseSignedRequest ( string appSecret, string signedRequestValue ) : object
ParseUrlQueryString ( string path, object>.IDictionary parameters, bool forceParseAllUrls ) : string
ParseUrlQueryString ( string path, object>.IDictionary parameters, bool forceParseAllUrls, Uri &uri, bool &isLegacyRestApi, bool &isAbsolutePath ) : string
PrepareBatchRequest ( FacebookBatchParameter batchParameters, object parameters ) : object
PrepareRequest ( HttpMethod httpMethod, string path, object parameters, Type resultType, Stream &input, bool &containsEtag, IList &batchEtags ) : HttpHelper
ProcessBatchResponse ( object result, IList batchEtags ) : object
ProcessResponse ( HttpHelper httpHelper, string responseString, Type resultType, bool containsEtag, IList batchEtags ) : object
SerializeParameters ( object>.IDictionary parameters ) : void
SetDefaultJsonSerializers ( string>.Func jsonSerializer, Func jsonDeserializer ) : void
SetJsonSerializers ( string>.Func jsonSerializer, Func jsonDeserializer ) : void
ToDictionary ( object parameters, FacebookMediaObject>.IDictionary &mediaObjects, FacebookMediaStream>.IDictionary &mediaStreams ) : object>.IDictionary

Converts the parameters to IDictionary<string,object>

TryParseOAuthCallbackUrl ( Uri url, FacebookOAuthResult &facebookOAuthResult ) : bool
TryParseSignedRequest ( string signedRequestValue, object &signedRequest ) : bool
TryParseSignedRequest ( string appSecret, string signedRequestValue, object &signedRequest ) : bool

Method Details

Batch() public méthode

Makes a batch request to the Facebook server.
public Batch ( ) : object
Résultat object

Batch() public méthode

Makes a batch request to the Facebook server.
public Batch ( FacebookBatchParameter batchParameters, object parameters ) : object
batchParameters FacebookBatchParameter List of batch parameters.
parameters object The parameters
Résultat object

BatchTaskAsync() public méthode

Makes an asynchronous batch request to the Facebook server.
public BatchTaskAsync ( ) : Task
Résultat Task

BatchTaskAsync() public méthode

public BatchTaskAsync ( FacebookBatchParameter batchParameters, object userToken, CancellationToken cancellationToken ) : Task
batchParameters FacebookBatchParameter
userToken object
cancellationToken CancellationToken
Résultat Task

BatchTaskAsync() public méthode

Makes an asynchronous batch request to the Facebook server.
public BatchTaskAsync ( FacebookBatchParameter batchParameters, object userState, CancellationToken cancellationToken, System uploadProgress ) : Task
batchParameters FacebookBatchParameter /// List of batch parameters. ///
userState object /// The user state. ///
cancellationToken CancellationToken /// The cancellation token. ///
uploadProgress System
Résultat Task

BatchTaskAsync() public méthode

public BatchTaskAsync ( FacebookBatchParameter batchParameters, object userToken, object parameters, CancellationToken cancellationToken ) : Task
batchParameters FacebookBatchParameter
userToken object
parameters object
cancellationToken CancellationToken
Résultat Task

BatchTaskAsync() public méthode

Makes an asynchronous batch request to the Facebook server.
public BatchTaskAsync ( FacebookBatchParameter batchParameters, object userState, object parameters, CancellationToken cancellationToken, System uploadProgress ) : Task
batchParameters FacebookBatchParameter /// List of batch parameters. ///
userState object /// The user state. ///
parameters object /// The parameters. ///
cancellationToken CancellationToken /// The cancellation token. ///
uploadProgress System
Résultat Task

FacebookClient() public méthode

Initializes a new instance of the FacebookClient class.
Access token in null or empty.
public FacebookClient ( string accessToken ) : System
accessToken string The facebook access_token.
Résultat System

GetDialogUrl() public méthode

Gets the Facebook dialog url.
/// If dialog or parameters is null. ///
public GetDialogUrl ( string dialog, object parameters ) : Uri
dialog string /// The dialog name. Values can be oauth, feed, pagetab, friends, pay, apprequests, and send. ///
parameters object /// The parameters. ///
Résultat System.Uri

GetLoginUrl() public méthode

Gets the Facebook OAuth login url.
/// If parameters is null. ///
public GetLoginUrl ( object parameters ) : Uri
parameters object /// The parameters. ///
Résultat System.Uri

GetLogoutUrl() public méthode

Gets the Facebook OAuth logout url.
public GetLogoutUrl ( object parameters ) : Uri
parameters object /// The parameters. ///
Résultat System.Uri

ParseSignedRequest() public méthode

Parse the facebook signed_request.
Throws if appSecret or signedRequestValue is null or empty. If the signedRequestValue is an invalid signed_request.
public ParseSignedRequest ( string signedRequestValue ) : object
signedRequestValue string The signed_request value.
Résultat object

SetDefaultHttpWebRequestFactory() public static méthode

Sets the default http web request factory.
public static SetDefaultHttpWebRequestFactory ( HttpWebRequestWrapper>.Func httpWebRequestFactory ) : void
httpWebRequestFactory HttpWebRequestWrapper>.Func
Résultat void

SetHttpWebRequestFactory() public méthode

Sets the http web request factory for the current instance of FacebookClient.
public SetHttpWebRequestFactory ( HttpWebRequestWrapper>.Func httpWebRequestFactory ) : void
httpWebRequestFactory HttpWebRequestWrapper>.Func
Résultat void

VerifyGetSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP GET.
public VerifyGetSubscription ( string requestHubMode, string requestVerifyToken, string requestHubChallenge ) : void
requestHubMode string The request hub.mode
requestVerifyToken string The request hub.verify_token
requestHubChallenge string The request hub.challenge
Résultat void

VerifyGetSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP GET.
public VerifyGetSubscription ( string requestHubMode, string requestVerifyToken, string requestHubChallenge, string verifyToken ) : void
requestHubMode string The request hub.mode
requestVerifyToken string The request hub.verify_token
requestHubChallenge string The request hub.challenge
verifyToken string Expected verify token.
Résultat void

VerifyPostSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.
public VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody ) : object
requestHttpXHubSignature string The request HTTP_X_HUB_SIGNATURE
requestBody string The request body.
Résultat object

VerifyPostSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.
public VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, Type resultType ) : object
requestHttpXHubSignature string The request HTTP_X_HUB_SIGNATURE
requestBody string The request body.
resultType Type The result type.
Résultat object

VerifyPostSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.
public VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, Type resultType, string appSecret ) : object
requestHttpXHubSignature string The request HTTP_X_HUB_SIGNATURE
requestBody string The request body.
resultType Type The result type.
appSecret string The App secret.
Résultat object

VerifyPostSubscription() public méthode

Verify HTTP_X_HUB_SIGNATURE for HTTP POST.
public VerifyPostSubscription ( string requestHttpXHubSignature, string requestBody, string appSecret ) : object
requestHttpXHubSignature string The request HTTP_X_HUB_SIGNATURE
requestBody string The request body.
appSecret string The App secret.
Résultat object