Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias TryExcept body Import alias Assign NameStore Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body TryExcept body ImportFrom alias Assign NameStore Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body ImportFrom alias Assign NameStore Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Str Return Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body Expr Str Assert AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Dict Str body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword Dict Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr Str If UnaryOpNot NameLoad body Assign NameStore Dict If AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr orelse Assign SubscriptStore NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str TryFinally body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr Str body Raise Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call AttributeLoad NameLoad attr BinOpAdd Str Call NameLoad NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp TupleLoad NameLoad SubscriptLoad NameLoad Index Num comprehension TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str attr Assign NameStore Call AttributeLoad Str attr GeneratorExp BinOpAdd BinOpAdd NameLoad Str SubscriptLoad NameLoad Index NameLoad comprehension NameStore Call NameLoad Call AttributeLoad NameLoad attr CompareNotEq NameLoad Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad NameLoad attr If BoolOpAnd CompareEq NameLoad Call AttributeLoad NameLoad attr Str CompareLt Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str body Return NameLoad orelse Return NameLoad decorator_list
N/A N/A Python client library for the Facebook Platform.

This client library is designed to support the Graph API and the official
Facebook JavaScript SDK, which is the canonical way to implement
Facebook authentication. Read more about the Graph API at
http://developers.facebook.com/docs/api. You can download the Facebook
JavaScript SDK at http://github.com/facebook/connect-js/.

If your application is using Google AppEngine's webapp framework, your
usage of this module might look like this:

    user = facebook.get_user_from_cookie(self.request.cookies, key, secret)
    if user:
        graph = facebook.GraphAPI(user["access_token"])
        profile = graph.get_object("me")
        friends = graph.get_connections("me", "friends")

 N/A cgi N/A hashlib N/A time N/A urllib N/A logging N/A logging gluon.tools fetch N/A N/A N/A json N/A _parse_json N/A N/A N/A s N/A N/A N/A json loads s N/A N/A N/A ImportError N/A N/A N/A gluon.contrib simplejson N/A _parse_json N/A N/A N/A s N/A N/A N/A simplejson loads s N/A N/A N/A ImportError N/A django.utils simplejson N/A _parse_json N/A N/A N/A s N/A N/A N/A simplejson loads s GraphAPI N/A object N/A N/A A client for the Facebook Graph API.

    See http://developers.facebook.com/docs/api for complete documentation
    for the API.

    The Graph API is made up of the objects in Facebook (e.g., people, pages,
    events, photos) and the connections between them (e.g., friends,
    photo tags, and event RSVPs). This client provides access to those
    primitive types in a generic way. For example, given an OAuth access
    token, this will fetch the profile of the active user and the list
    of the user's friends:

       graph = facebook.GraphAPI(access_token)
       user = graph.get_object("me")
       friends = graph.get_connections(user["id"], "friends")

    You can see a list of all of the objects and connections supported
    by the API at http://developers.facebook.com/docs/reference/api/.

    You can obtain an access token via OAuth or by using the Facebook
    JavaScript SDK. See http://developers.facebook.com/docs/authentication/
    for details.

    If you are using the JavaScript SDK, you can use the
    get_user_from_cookie() method below to get the OAuth access token
    for the active user from the cookie saved by the SDK.
     __init__ N/A N/A self access_token N/A None N/A N/A N/A self access_token access_token N/A get_object N/A N/A self id N/A args N/A N/A Fetchs the given object from the graph. N/A N/A N/A self request id args N/A get_objects N/A N/A self ids N/A args N/A N/A Fetchs all of the given object from the graph.

        We return a map from ID to object. If any of the IDs are invalid,
        we raise an exception.
         N/A N/A args N/A ids N/A N/A , join ids N/A N/A N/A self request args N/A get_connections N/A N/A self id connection_name N/A args N/A N/A Fetchs the connections for given object. N/A N/A N/A self request N/A N/A id / connection_name args N/A put_object N/A N/A self parent_object connection_name N/A data N/A N/A Writes the given object to the graph, connected to the given parent.

        For example,

            graph.put_object("me", "feed", message="Hello, world")

        writes "Hello, world" to the active user's wall. Likewise, this
        will comment on a the first post of the active user's feed:

            feed = graph.get_connections("me", "feed")
            post = feed["data"][0]
            graph.put_object(post["id"], "comments", message="First!")

        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.
         N/A N/A self access_token Write operations require an access token N/A N/A N/A self request N/A N/A parent_object / connection_name post_args data N/A put_wall_post N/A N/A self message attachment profile_id N/A N/A me N/A N/A 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"}

         N/A N/A N/A self put_object profile_id feed message message attachment N/A put_comment N/A N/A self object_id message N/A N/A N/A Writes the given comment on the given post. N/A N/A N/A self put_object object_id comments message message N/A put_like N/A N/A self object_id N/A N/A N/A Likes the given post. N/A N/A N/A self put_object object_id likes N/A delete_object N/A N/A self id N/A N/A N/A Deletes the object with the given ID from the graph. N/A N/A N/A self request id post_args N/A method delete N/A request N/A N/A self path args post_args N/A None None N/A N/A Fetches the given path in the Graph API.

        We translate args to a valid query string. If post_args is given,
        we send a POST request to the given path with the given arguments.
         N/A N/A N/A logging info in facebook request N/A N/A args N/A N/A args N/A N/A N/A self access_token N/A N/A N/A post_args None N/A N/A N/A post_args N/A access_token N/A self access_token N/A N/A N/A args N/A access_token N/A self access_token N/A post_data N/A N/A post_args None None N/A N/A urllib urlencode post_args N/A N/A N/A logging info about to open url N/A s N/A fetch N/A N/A N/A https://graph.facebook.com/ path ? N/A N/A urllib urlencode args post_args N/A N/A N/A logging info opened URL N/A N/A N/A N/A N/A logging info parsing N/A response N/A _parse_json s N/A N/A N/A N/A logging info closing N/A N/A N/A response get error N/A N/A N/A GraphAPIError N/A N/A response N/A error N/A code N/A N/A response N/A error N/A message N/A N/A N/A logging info N/A returning  N/A repr response N/A response N/A N/A GraphAPIError N/A Exception N/A __init__ N/A N/A self code message N/A N/A N/A N/A N/A Exception __init__ self message N/A N/A self code code N/A N/A get_user_from_cookie N/A N/A cookies app_id app_secret N/A N/A N/A 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/.
     N/A cookie N/A N/A cookies get N/A fbs_ app_id N/A N/A cookie N/A N/A None N/A cookie N/A cookie value N/A args N/A dict N/A N/A k N/A v N/A -1 N/A N/A k v N/A N/A N/A N/A cgi parse_qs N/A N/A cookie strip " items N/A payload N/A N/A join N/A N/A N/A k = N/A args N/A k N/A k N/A sorted N/A N/A args keys N/A k sig N/A sig N/A N/A N/A N/A hashlib md5 N/A payload app_secret hexdigest N/A N/A N/A sig N/A N/A args get sig N/A N/A N/A time time N/A int N/A args N/A expires N/A N/A args N/A N/A None N/A