

@_auth_return_future
def facebook_request(self, path, callback, access_token=None, post_args=None, **args):
    'Fetches the given relative API path, e.g., "/btaylor/picture"\n\n        If the request is a POST, ``post_args`` should be provided. Query\n        string arguments should be given as keyword arguments.\n\n        An introduction to the Facebook Graph API can be found at\n        http://developers.facebook.com/docs/api\n\n        Many methods require an OAuth access token which you can\n        obtain through `~OAuth2Mixin.authorize_redirect` and\n        `get_authenticated_user`. The user returned through that\n        process includes an ``access_token`` attribute that can be\n        used to make authenticated requests via this method.\n\n        Example usage::\n\n            class MainHandler(tornado.web.RequestHandler,\n                              tornado.auth.FacebookGraphMixin):\n                @tornado.web.authenticated\n                @tornado.web.asynchronous\n                @tornado.gen.coroutine\n                def get(self):\n                    new_entry = yield self.facebook_request(\n                        "/me/feed",\n                        post_args={"message": "I am posting from my Tornado application!"},\n                        access_token=self.current_user["access_token"])\n\n                    if not new_entry:\n                        # Call failed; perhaps missing permission?\n                        yield self.authorize_redirect()\n                        return\n                    self.finish("Posted a message!")\n\n        The given path is relative to ``self._FACEBOOK_BASE_URL``,\n        by default "https://graph.facebook.com".\n\n        .. versionchanged:: 3.1\n           Added the ability to override ``self._FACEBOOK_BASE_URL``.\n        '
    url = (self._FACEBOOK_BASE_URL + path)
    all_args = {
        
    }
    if access_token:
        post_args['access_token'] = access_token
        all_args.update(args)
    if all_args:
        url += ('?' + urllib_parse.urlencode(all_args))
    callback = self.async_callback(self._on_facebook_request, callback)
    http = self.get_auth_http_client()
    if (post_args is not None):
        http.fetch(url, method='POST', body=urllib_parse.urlencode(post_args), callback=callback)
    else:
        http.fetch(url, callback=callback)

dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/auth.py FacebookGraphMixin.facebook_request/VarMisuse@52/593 `all_args`->`post_args`