C# Класс Facebook.FacebookOAuthClient

Represents the Facebook OAuth Helpers
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
BuildApplicationAccessTokenParameters object>.IDictionary
BuildApplicationAccessTokenResult object
BuildExchangeCodeForAccessTokenParameters object>.IDictionary
BuildExchangeCodeForAccessTokenResult object
DownloadDataCompleted void
GetApiEventArgs Facebook.FacebookApiEventArgs

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

ExchangeCodeForAccessToken() публичный метод

Exchange code for access token.
public ExchangeCodeForAccessToken ( string code ) : object
code string /// The code. ///
Результат object

ExchangeCodeForAccessToken() публичный метод

Exchange code for access token.
public ExchangeCodeForAccessToken ( string code, object>.IDictionary parameters ) : object
code string /// The code. ///
parameters object>.IDictionary /// The parameters. ///
Результат object

ExchangeCodeForAccessTokenAsync() публичный метод

Exchange code for access token asynchronously.
public ExchangeCodeForAccessTokenAsync ( string code ) : void
code string /// The code. ///
Результат void

ExchangeCodeForAccessTokenAsync() публичный метод

Exchange code for access token asynchronously.
public ExchangeCodeForAccessTokenAsync ( string code, object>.IDictionary parameters ) : void
code string /// The code. ///
parameters object>.IDictionary /// The parameters. ///
Результат void

ExchangeCodeForAccessTokenAsync() публичный метод

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. ///
Результат void

FacebookOAuthClient() публичный метод

Initializes a new instance of the FacebookOAuthClient class.
public FacebookOAuthClient ( ) : System
Результат System

FacebookOAuthClient() публичный метод

Initializes a new instance of the FacebookOAuthClient class.
public FacebookOAuthClient ( IFacebookApplication facebookApplication ) : System
facebookApplication IFacebookApplication /// The facebook application. ///
Результат System

GetApplicationAccessToken() публичный метод

Gets the application access token.
public GetApplicationAccessToken ( ) : object
Результат object

GetApplicationAccessToken() публичный метод

Gets the application access token.
public GetApplicationAccessToken ( object>.IDictionary parameters ) : object
parameters object>.IDictionary /// The parameters. ///
Результат object

GetApplicationAccessTokenAsync() публичный метод

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( ) : void
Результат void

GetApplicationAccessTokenAsync() публичный метод

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( object>.IDictionary parameters, object userToken ) : void
parameters object>.IDictionary /// The parameters. ///
userToken object /// The user token. ///
Результат void

GetApplicationAccessTokenAsync() публичный метод

Gets the application access token asynchronously.
public GetApplicationAccessTokenAsync ( object userToken ) : void
userToken object /// The user token. ///
Результат void

GetLoginUrl() публичный метод

Gets the login uri.
public GetLoginUrl ( ) : Uri
Результат System.Uri

GetLoginUrl() публичный метод

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. ///
Результат System.Uri

GetLoginUrl() публичный статический метод

Gets the login url.
public static GetLoginUrl ( string appId, Uri redirectUri ) : Uri
appId string /// The app id. ///
redirectUri System.Uri /// The redirect Uri. ///
Результат System.Uri

GetLoginUrl() публичный статический метод

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). ///
Результат System.Uri

GetLoginUrl() публичный статический метод

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. ///
Результат System.Uri

GetLoginUrl() публичный статический метод

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. ///
Результат System.Uri

GetLogoutUrl() публичный метод

Gets the logout url.
public GetLogoutUrl ( ) : Uri
Результат System.Uri

GetLogoutUrl() публичный метод

Gets the logout url.
public GetLogoutUrl ( object>.IDictionary parameters ) : Uri
parameters object>.IDictionary /// The parameters. ///
Результат System.Uri

GetUrl() защищенный метод

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 ///
Результат System.Uri

OAuthRequest() защищенный метод

protected OAuthRequest ( string name, string path, object>.IDictionary parameters ) : string
name string
path string
parameters object>.IDictionary
Результат string

OAuthRequestAsync() защищенный метод

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
Результат void