C# Class Facebook.FacebookOAuthClient

Represents the Facebook OAuth Helpers
Afficher le fichier Open project: anujb/MonoMobile.Facebook Class Usage Examples

Private Properties

Свойство Type Description
BuildApplicationAccessTokenParameters object>.IDictionary
BuildApplicationAccessTokenResult object
BuildExchangeCodeForAccessTokenParameters object>.IDictionary
BuildExchangeCodeForAccessTokenResult object
DownloadDataCompleted void
GetApiEventArgs Facebook.FacebookApiEventArgs

Méthodes publiques

Méthode Description
ExchangeCodeForAccessToken ( string code ) : object

Exchange code for access token.

ExchangeCodeForAccessToken ( string code, object>.IDictionary parameters ) : object

Exchange code for access token.

ExchangeCodeForAccessTokenAsync ( string code ) : void

Exchange code for access token asynchronously.

ExchangeCodeForAccessTokenAsync ( string code, object>.IDictionary parameters ) : void

Exchange code for access token asynchronously.

ExchangeCodeForAccessTokenAsync ( string code, object>.IDictionary parameters, object userToken ) : void

Exchange code for access token asynchronously.

FacebookOAuthClient ( ) : System

Initializes a new instance of the FacebookOAuthClient class.

FacebookOAuthClient ( IFacebookApplication facebookApplication ) : System

Initializes a new instance of the FacebookOAuthClient class.

GetApplicationAccessToken ( ) : object

Gets the application access token.

GetApplicationAccessToken ( object>.IDictionary parameters ) : object

Gets the application access token.

GetApplicationAccessTokenAsync ( ) : void

Gets the application access token asynchronously.

GetApplicationAccessTokenAsync ( object>.IDictionary parameters, object userToken ) : void

Gets the application access token asynchronously.

GetApplicationAccessTokenAsync ( object userToken ) : void

Gets the application access token asynchronously.

GetLoginUrl ( ) : Uri

Gets the login uri.

GetLoginUrl ( object>.IDictionary parameters ) : Uri

Gets the login uri.

http://developers.facebook.com/docs/reference/dialogs/oauth Parameters that can be used: client_id : Your application's identifier. This is called client_id instead of app_id for this particular method to be compliant with the OAuth 2.0 specification. Required, but automatically specified by most SDKs. redirect_uri : The URL to redirect to after the user clicks a button on the dialog. Required, but automatically specified by most SDKs. scope : Optional. A comma-delimited list of permissions. state : Optional. An opaque string used to maintain application state between the request and callback. When Facebook redirects the user back to your redirect_uri, this value will be included unchanged in the response. response_type : Optional, default is token. The requested response: an access token (token), an authorization code (code), or both (code_and_token). display : The display mode in which to render the dialog. The default is page on the www subdomain and wap on the m subdomain. This is automatically specified by most SDKs. (For WP7 builds it is set to touch.)

GetLoginUrl ( string appId, Uri redirectUri ) : Uri

Gets the login url.

GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions ) : Uri

Gets the login url.

GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions, object>.IDictionary loginParameters ) : Uri

Gets the login url.

GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions, bool logout, object>.IDictionary loginParameters ) : Uri

Gets the login url.

GetLogoutUrl ( ) : Uri

Gets the logout url.

GetLogoutUrl ( object>.IDictionary parameters ) : Uri

Gets the logout url.

Méthodes protégées

Méthode Description
GetUrl ( string name, string path, object>.IDictionary parameters ) : Uri

Build the URL for given domain alias, path and parameters.

OAuthRequest ( string name, string path, object>.IDictionary parameters ) : string
OAuthRequestAsync ( string name, string path, object>.IDictionary parameters, object userToken, string>.Func processResponseString, FacebookApiEventArgs>.Action onDownloadComplete ) : void

Private Methods

Méthode Description
BuildApplicationAccessTokenParameters ( object>.IDictionary parameters, string &name, string &path ) : object>.IDictionary
BuildApplicationAccessTokenResult ( string responseString ) : object
BuildExchangeCodeForAccessTokenParameters ( object>.IDictionary parameters, string &name, string &path ) : object>.IDictionary
BuildExchangeCodeForAccessTokenResult ( string json ) : object
DownloadDataCompleted ( object sender, DownloadDataCompletedEventArgsWrapper e, string>.Func processResponseString, FacebookApiEventArgs>.Action onDownloadComplete ) : void
GetApiEventArgs ( AsyncCompletedEventArgs e, string json, Facebook.HttpMethod &httpMethod ) : Facebook.FacebookApiEventArgs

Method Details

ExchangeCodeForAccessToken() public méthode

Exchange code for access token.
public ExchangeCodeForAccessToken ( string code ) : object
code string /// The code. ///
Résultat object

ExchangeCodeForAccessToken() public méthode

Exchange code for access token.
public ExchangeCodeForAccessToken ( string code, object>.IDictionary parameters ) : object
code string /// The code. ///
parameters object>.IDictionary /// The parameters. ///
Résultat object

ExchangeCodeForAccessTokenAsync() public méthode

Exchange code for access token asynchronously.
public ExchangeCodeForAccessTokenAsync ( string code ) : void
code string /// The code. ///
Résultat void

ExchangeCodeForAccessTokenAsync() public méthode

Exchange code for access token asynchronously.
public ExchangeCodeForAccessTokenAsync ( string code, object>.IDictionary parameters ) : void
code string /// The code. ///
parameters object>.IDictionary /// The parameters. ///
Résultat void

ExchangeCodeForAccessTokenAsync() public méthode

Exchange code for access token asynchronously.
public ExchangeCodeForAccessTokenAsync ( string code, object>.IDictionary parameters, object userToken ) : void
code string /// The code. ///
parameters object>.IDictionary /// The parameters. ///
userToken object /// The user token. ///
Résultat void

FacebookOAuthClient() public méthode

Initializes a new instance of the FacebookOAuthClient class.
public FacebookOAuthClient ( ) : System
Résultat System

FacebookOAuthClient() public méthode

Initializes a new instance of the FacebookOAuthClient class.
public FacebookOAuthClient ( IFacebookApplication facebookApplication ) : System
facebookApplication IFacebookApplication /// The facebook application. ///
Résultat System

GetApplicationAccessToken() public méthode

Gets the application access token.
public GetApplicationAccessToken ( ) : object
Résultat object

GetApplicationAccessToken() public méthode

Gets the application access token.
public GetApplicationAccessToken ( object>.IDictionary parameters ) : object
parameters object>.IDictionary /// The parameters. ///
Résultat object

GetApplicationAccessTokenAsync() public méthode

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( ) : void
Résultat void

GetApplicationAccessTokenAsync() public méthode

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( object>.IDictionary parameters, object userToken ) : void
parameters object>.IDictionary /// The parameters. ///
userToken object /// The user token. ///
Résultat void

GetApplicationAccessTokenAsync() public méthode

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( object userToken ) : void
userToken object /// The user token. ///
Résultat void

GetLoginUrl() public méthode

Gets the login uri.
public GetLoginUrl ( ) : Uri
Résultat System.Uri

GetLoginUrl() public méthode

Gets the login uri.
http://developers.facebook.com/docs/reference/dialogs/oauth Parameters that can be used: client_id : Your application's identifier. This is called client_id instead of app_id for this particular method to be compliant with the OAuth 2.0 specification. Required, but automatically specified by most SDKs. redirect_uri : The URL to redirect to after the user clicks a button on the dialog. Required, but automatically specified by most SDKs. scope : Optional. A comma-delimited list of permissions. state : Optional. An opaque string used to maintain application state between the request and callback. When Facebook redirects the user back to your redirect_uri, this value will be included unchanged in the response. response_type : Optional, default is token. The requested response: an access token (token), an authorization code (code), or both (code_and_token). display : The display mode in which to render the dialog. The default is page on the www subdomain and wap on the m subdomain. This is automatically specified by most SDKs. (For WP7 builds it is set to touch.)
public GetLoginUrl ( object>.IDictionary parameters ) : Uri
parameters object>.IDictionary /// The parameters. ///
Résultat System.Uri

GetLoginUrl() public static méthode

Gets the login url.
public static GetLoginUrl ( string appId, Uri redirectUri ) : Uri
appId string /// The app id. ///
redirectUri System.Uri /// The redirect Uri. ///
Résultat System.Uri

GetLoginUrl() public static méthode

Gets the login url.
public static GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions ) : Uri
appId string /// The app id. ///
redirectUri System.Uri /// The redirect Uri. ///
extendedPermissions string /// The extended permissions (scope). ///
Résultat System.Uri

GetLoginUrl() public static méthode

Gets the login url.
public static GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions, object>.IDictionary loginParameters ) : Uri
appId string /// The app id. ///
redirectUri System.Uri /// The redirect Uri. ///
extendedPermissions string /// The extended permissions (scope). ///
loginParameters object>.IDictionary /// The login parameters. ///
Résultat System.Uri

GetLoginUrl() public static méthode

Gets the login url.
public static GetLoginUrl ( string appId, Uri redirectUri, string extendedPermissions, bool logout, object>.IDictionary loginParameters ) : Uri
appId string /// The app id. ///
redirectUri System.Uri /// The redirect Uri. ///
extendedPermissions string /// The extended permissions (scope). ///
logout bool /// Indicates whether to logout existing logged in user or not. ///
loginParameters object>.IDictionary /// The login parameters. ///
Résultat System.Uri

GetLogoutUrl() public méthode

Gets the logout url.
public GetLogoutUrl ( ) : Uri
Résultat System.Uri

GetLogoutUrl() public méthode

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

GetUrl() protected méthode

Build the URL for given domain alias, path and parameters.
protected GetUrl ( string name, string path, object>.IDictionary parameters ) : Uri
name string /// The name of the domain (from the domain maps). ///
path string /// Optional path (without a leading slash) ///
parameters object>.IDictionary /// Optional query parameters ///
Résultat System.Uri

OAuthRequest() protected méthode

protected OAuthRequest ( string name, string path, object>.IDictionary parameters ) : string
name string
path string
parameters object>.IDictionary
Résultat string

OAuthRequestAsync() protected méthode

protected OAuthRequestAsync ( string name, string path, object>.IDictionary parameters, object userToken, string>.Func processResponseString, FacebookApiEventArgs>.Action onDownloadComplete ) : void
name string
path string
parameters object>.IDictionary
userToken object
processResponseString string>.Func
onDownloadComplete FacebookApiEventArgs>.Action
Résultat void