class_docstr: Facebook authentication using the new Graph API and OAuth2.
class_docstr_tok: ["Facebook","authentication","using","the","new","Graph","API","and","OAuth2","."]
code: def _on_access_token(
      self,
      redirect_uri,
      client_id,
      client_secret,
      future,
      fields,
      response,
  ):
      if response.error:
          future.set_exception(
              AuthError("Facebook auth error: %s" % str(response))
          )
          return
  
      args = escape.json_decode(response.body)
      session = {
          "access_token": args.get("access_token"),
          "expires_in": args.get("expires_in"),
      }
  
      self.facebook_request(
          path="/me",
          callback=functools.partial(
              self._on_get_user_info, future, session, fields
          ),
          access_token=session["access_token"],
          appsecret_proof=hmac.new(
              key=client_secret.encode("utf8"),
              msg=session["access_token"].encode("utf8"),
              digestmod=hashlib.sha256,
          ).hexdigest(),
          fields=",".join(fields),
      )
  
imports: from __future__ import absolute_import, division, print_function
  import base64
  import binascii
  import functools
  import hashlib
  import hmac
  import time
  import uuid
  from tornado.concurrent import TracebackFuture, return_future, chain_future
  from tornado import gen
  from tornado import httpclient
  from tornado import escape
  from tornado.httputil import url_concat
  from tornado.log import gen_log
  from tornado.stack_context import ExceptionStackContext
  from tornado.util import unicode_type, ArgReplacer, PY3
label_desc: Use image node_id 2 for calling the FacebookGraphMixin obj's underlying member method code with example usage: obj._on_access_token(redirect_uri, client_id, client_secret, future, fields, response) without return types