C# Class Facebook.FacebookApi

Last.fm API sesspis
Inheritance: IFacebookApi
Mostra file Open project: bbyk/graph.net Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

BeginDelete() public method

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.
return IAsyncResult

BeginDelete() public method

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.
return IAsyncResult

BeginGet() public method

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.
return IAsyncResult

BeginGet() public method

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.
return IAsyncResult

BeginPost() public method

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.
return IAsyncResult

Delete() public method

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.
return JsonObject

Delete() public method

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.
return JsonObject

EncodeDictionary() public static method

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
return string

EndDelete() public method

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.
return JsonObject

EndGet() public method

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.
return JsonObject

EndPost() public method

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.
return JsonObject

FacebookApi() public method

Create a new instance of the API, with public access only.
public FacebookApi ( ) : System
return System

FacebookApi() public method

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)
return System

FacebookApi() public method

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.
return System

Get() public method

Makes a Facebook API GET request.
is null.
public Get ( [ relativePath ) : JsonObject
relativePath [ The path for the call, e.g. /username
return JsonObject

Get() public method

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.
return JsonObject

Post() public method

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.
return JsonObject