/// <summary>
/// Fetchs the given object from the graph.
/// </summary>
/// <param name="id">Id of the object to fetch</param>
/// <param name="args">List of arguments</param>
/// <returns>The required object</returns>
public JObject GetObject(string id, Dictionary<string, string> args);

/// <summary>
/// Fetchs all of the given object from the graph.
/// </summary>
/// <param name="args"></param>
/// <param name="ids">Ids of the objects to return</param>
/// <returns>
/// A map from ID to object. If any of the IDs are invalid, an exception is raised
/// </returns>
public JObject GetObjects(Dictionary<string, string> args, params string[] ids);

/// <summary>
/// Fetchs the connections for given object.
/// </summary>
/// <param name="id">Id of the object to fetch</param>
/// <param name="connectionName">Name of the connection</param>
/// <param name="args">List of arguments</param>
/// <returns>A JObject containing the required connections</returns>
public JObject GetConnections(string id, string connectionName, Dictionary<string, string> args);

/// <summary>
/// Writes the given object to the graph, connected to the given parent.
///
/// For example,
///
/// var data = new Dictionary&lt;string, string&gt;();
/// data.Add("message", "Hello, world");
/// facebook.PutObject("me", "feed", data);
///
/// writes "Hello, world" to the active user's wall.
///
/// See http://developers.facebook.com/docs/api#publishing for all of
/// the supported writeable objects.
///
/// Most write operations require extended permissions. For example,
/// publishing wall posts requires the "publish_stream" permission. See
/// http://developers.facebook.com/docs/authentication/ for details about
/// extended permissions.
/// </summary>
/// <param name="parentObject">The parent object</param>
/// <param name="connectionName">The connection name</param>
/// <param name="data">Post data</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject PutObject(string parentObject, string connectionName, Dictionary<string, string> data);


/// <summary>
/// Writes a wall post to current user wall.
///
/// We default to writing to the authenticated user's wall if no
/// profile_id is specified.
///
/// attachment adds a structured attachment to the status message being
/// posted to the Wall. It should be a dictionary of the form:
///
/// name": "Link name"
/// "link": "http://www.example.com/",
/// "caption": "{*actor*} posted a new review",
/// "description": "This is a longer description of the attachment",
/// "picture": "http://www.example.com/thumbnail.jpg
/// </summary>
/// <param name="message">The message to put on the wall</param>
/// <param name="attachment">Optional attachment for the message</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject PutWallPost(string message, Dictionary<string, string> attachment);

/// <summary>
/// Writes a wall post to the given profile's wall.
///
/// We default to writing to the authenticated user's wall if no
/// profile_id is specified.
///
/// attachment adds a structured attachment to the status message being
/// posted to the Wall. It should be a dictionary of the form:
///
/// name": "Link name"
/// "link": "http://www.example.com/",
/// "caption": "{*actor*} posted a new review",
/// "description": "This is a longer description of the attachment",
/// "picture": "http://www.example.com/thumbnail.jpg
/// </summary>
/// <param name="message">The message to put on the wall</param>
/// <param name="attachment">Optional attachment for the message</param>
/// <param name="profileId">The profile where the message is goint to be put</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject PutWallPost(string message, Dictionary<string, string> attachment, string profileId);

/// <summary>
/// Writes the given comment on the given post.
/// </summary>
/// <param name="objectId">Id of the object</param>
/// <param name="message">Message</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject PutComment(string objectId, string message);

/// <summary>
/// Likes the given post.
/// </summary>
/// <param name="objectId">Id of the object to be like</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject PutLike(string objectId);

/// <summary>
/// Deletes the object with the given ID from the graph.
/// </summary>
/// <param name="id">Id of the object to delete</param>
/// <returns>A JObject with the result of the operation</returns>
public JObject DeleteObject(string id);

/// <summary>
/// Parses the cookie set by the official Facebook JavaScript SDK.
///
/// cookies should be a dictionary-like object mapping cookie names to
/// cookie values.
///
/// If the user is logged in via Facebook, we return a dictionary with the
/// keys "uid" and "access_token". The former is the user's Facebook ID,
/// and the latter can be used to make authenticated requests to the Graph API.
/// If the user is not logged in, we return None.
///
/// Download the official Facebook JavaScript SDK at
/// http://github.com/facebook/connect-js/. Read more about Facebook
/// authentication at http://developers.facebook.com/docs/authentication/.
/// </summary>
/// <param name="cookies">HttpCookieCollection</param>
/// <param name="appId">Facebook Application Id</param>
/// <param name="appSecret">Facebook Application Secret</param>
/// <returns>Dictionary with the keys "uid" and "access_token"</returns>
public static Dictionary<string, string> GetUserFromCookie(HttpCookieCollection cookies, string appId, string appSecret);

/// <summary>
/// Parses the get parameters sent on canvas iframe.
///
/// You need to enable the Canvas Session Parameter in
/// Application -> Edit Settings -> Advanced -> Migrations
///
/// If the user is logged in via Facebook, we return a dictionary with the
/// keys "uid" and "access_token". The former is the user's Facebook ID,
/// and the latter can be used to make authenticated requests to the Graph API.
/// If the user is not logged in, we return None.
/// </summary>
/// <param name="request">HttpRequest</param>
/// <param name="appId">Facebook Application Id</param>
/// <param name="appSecret">Facebook Application Secret</param>
/// <returns>Dictionary with the keys "uid" and "access_token"</returns>
public static Dictionary<string, string> GetUserFromQueryString(HttpRequest request, string appId, string appSecret);

Last edited Oct 6, 2010 at 6:09 PM by amiune, version 1

Comments

No comments yet.