C# Класс Facebook.FacebookApi

Last.fm API sesspis
Наследование: IFacebookApi
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
BeginDelete ( [ relativePath, [ cb, [ state ) : IAsyncResult

Begins to make a Facebook API DELETE request asynchronously.

BeginDelete ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult

Begins to make a Facebook API DELETE request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

BeginGet ( [ relativePath, [ cb, [ state ) : IAsyncResult

Begins to makes a Facebook API GET request asynchronously.

BeginGet ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult

Makes a Facebook API GET request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

BeginPost ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult

Begins to make a Facebook API POST request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

Delete ( [ relativePath ) : JsonObject

Makes a Facebook API DELETE request.

Delete ( [ relativePath, string>.[ args ) : JsonObject

Makes a Facebook API DELETE request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

EncodeDictionary ( string>.Dictionary dict ) : string

Encode a dictionary of key/value pairs as an HTTP query string.

EndDelete ( [ ar ) : JsonObject

Returns json status of the current operations which has been executing asynchronously.

EndGet ( IAsyncResult ar ) : JsonObject

Returns json status of the current operations which has been executing asynchronously.

EndPost ( IAsyncResult ar ) : JsonObject

Returns json status of the current operations which has been executing asynchronously.

FacebookApi ( ) : System

Create a new instance of the API, with public access only.

FacebookApi ( [ token ) : System

Create a new instance of the API, with specified access token.

FacebookApi ( [ token, [ culture ) : System

Create a new instance of the API, using the given token and culture (locale).

Get ( [ relativePath ) : JsonObject

Makes a Facebook API GET request.

Get ( [ relativePath, string>.[ args ) : JsonObject

Makes a Facebook API GET request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

Post ( [ relativePath, string>.[ args ) : JsonObject

Makes a Facebook API POST request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.

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

Метод Описание
BeginCall ( string relativePath, HttpVerb httpVerb, string>.Dictionary args, AsyncCallback cb, object state ) : IAsyncResult
BeginRequest ( string url, HttpVerb httpVerb, string>.Dictionary args, AsyncCallback cb, object state ) : IAsyncResult
Call ( string relativePath, HttpVerb httpVerb, string>.Dictionary args ) : JsonObject

Makes a Facebook Graph API Call.

EndCall ( IAsyncResult ar ) : JsonObject
EndRequest ( IAsyncResult ar ) : ResponseData
ExtractContentType ( HttpWebResponse response ) : string
GetApiBaseUrl ( string relativeUrl ) : string
MissingContentType ( ) : Exception
Nre ( string paramName ) : ArgumentNullException
OperationTimeout ( Exception ex ) : TimeoutException
Request ( string url, HttpVerb httpVerb, string>.Dictionary args, string &contentType ) : string

Make an HTTP request, with the given query args

ThrowIfError ( JsonObject obj ) : void
TransportError ( Exception ex ) : Exception
UnexpectedResponse ( string response ) : Exception

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

BeginDelete() публичный Метод

Begins to make a Facebook API DELETE request asynchronously.
is null. pre-request evaluation is failed.
public BeginDelete ( [ relativePath, [ cb, [ state ) : IAsyncResult
relativePath [ The path for the call, e.g. /username.
cb [ A callback to call upon operation complete.
state [ user state to pass to the callback.
Результат IAsyncResult

BeginDelete() публичный Метод

Begins to make a Facebook API DELETE request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
pre-request evaluation is failed.
public BeginDelete ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult
relativePath [ The path for the call, e.g. /username
args string>.[ A dictionary of key/value pairs that will get passed as query arguments. These determine what will get set in the graph API.
cb [ A callback to call upon operation complete.
state [ user state to pass to the callback.
Результат IAsyncResult

BeginGet() публичный Метод

Begins to makes a Facebook API GET request asynchronously.
is null. pre-request evaluation is failed.
public BeginGet ( [ relativePath, [ cb, [ state ) : IAsyncResult
relativePath [ The path for the call, e.g. /username
cb [ A callback to call upon operation complete.
state [ user state to pass to the callback.
Результат IAsyncResult

BeginGet() публичный Метод

Makes a Facebook API GET request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
pre-request evaluation is failed.
public BeginGet ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult
relativePath [ The path for the call, e.g. /username
args string>.[ A dictionary of key/value pairs that will get passed as query arguments.
cb [ A callback to call upon operation complete.
state [ user state to pass to the callback.
Результат IAsyncResult

BeginPost() публичный Метод

Begins to make a Facebook API POST request asynchronously. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
pre-request evaluation is failed.
public BeginPost ( [ relativePath, string>.[ args, [ cb, [ state ) : IAsyncResult
relativePath [ The path for the call, e.g. /username
args string>.[ A dictionary of key/value pairs that will get passed as query arguments. These determine what will get set in the graph API.
cb [ A callback to call upon operation complete.
state [ user state to pass to the callback.
Результат IAsyncResult

Delete() публичный Метод

Makes a Facebook API DELETE request.
an exception occurred during the call. is null.
public Delete ( [ relativePath ) : JsonObject
relativePath [ The path for the call, e.g. /username.
Результат JsonObject

Delete() публичный Метод

Makes a Facebook API DELETE request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
an exception occurred during the call.
public Delete ( [ relativePath, string>.[ args ) : JsonObject
relativePath [ The path for the call, e.g. /username.
args string>.[ A dictionary of key/value pairs that will get passed as query arguments. These determine what will get set in the graph API.
Результат JsonObject

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

Encode a dictionary of key/value pairs as an HTTP query string.
public static EncodeDictionary ( string>.Dictionary dict ) : string
dict string>.Dictionary The dictionary to encode
Результат string

EndDelete() публичный Метод

Returns json status of the current operations which has been executing asynchronously.
an exception occurred during the async call. is null.
public EndDelete ( [ ar ) : JsonObject
ar [ The current operation async result.
Результат JsonObject

EndGet() публичный Метод

Returns json status of the current operations which has been executing asynchronously.
an exception occurred during the async call. is null.
public EndGet ( IAsyncResult ar ) : JsonObject
ar IAsyncResult The current operation async result.
Результат JsonObject

EndPost() публичный Метод

Returns json status of the current operations which has been executing asynchronously.
an exception occurred during the async call. is null.
public EndPost ( IAsyncResult ar ) : JsonObject
ar IAsyncResult The current operation async result.
Результат JsonObject

FacebookApi() публичный Метод

Create a new instance of the API, with public access only.
public FacebookApi ( ) : System
Результат System

FacebookApi() публичный Метод

Create a new instance of the API, with specified access token.
public FacebookApi ( [ token ) : System
token [ An access token for api requests. If null, only public information is available (e.g. http://graph.facebook.com/710740487)
Результат System

FacebookApi() публичный Метод

Create a new instance of the API, using the given token and culture (locale).
public FacebookApi ( [ token, [ culture ) : System
token [ An access token for api requests. If null, only public information is available (e.g. http://graph.facebook.com/710740487).
culture [ for more information.
Результат System

Get() публичный Метод

Makes a Facebook API GET request.
is null.
public Get ( [ relativePath ) : JsonObject
relativePath [ The path for the call, e.g. /username
Результат JsonObject

Get() публичный Метод

Makes a Facebook API GET request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
an exception occurred during the call.
public Get ( [ relativePath, string>.[ args ) : JsonObject
relativePath [ The path for the call, e.g. /username
args string>.[ A dictionary of key/value pairs that will get passed as query arguments.
Результат JsonObject

Post() публичный Метод

Makes a Facebook API POST request. If relativePath is null, args should contain ids or another facebook blessed approach to mean it is a batch call.
an exception occurred during the call.
public Post ( [ relativePath, string>.[ args ) : JsonObject
relativePath [ The path for the call, e.g. /username
args string>.[ A dictionary of key/value pairs that will get passed as query arguments. These determine what will get set in the graph API.
Результат JsonObject