nodes: 0, module; 1, function_definition; 2, function_name:deauthorize_application; 3, parameters; 4, block; 5, identifier:request; 6, expression_statement; 7, if_statement; 8, comment:"""
      When a user deauthorizes an application, Facebook sends a HTTP POST request to the application's
      "deauthorization callback" URL. This view picks up on requests of this sort and marks the corresponding
      users as unauthorized.
      """; 9, attribute; 10, block; 11, else_clause; 12, identifier:request; 13, identifier:facebook; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, return_statement; 18, block; 19, assignment; 20, assignment; 21, call; 22, call; 23, return_statement; 24, identifier:user; 25, call; 26, attribute; 27, False; 28, attribute; 29, argument_list; 30, identifier:HttpResponse; 31, argument_list; 32, call; 33, attribute; 34, argument_list; 35, identifier:user; 36, identifier:authorized; 37, identifier:user; 38, identifier:save; 39, identifier:HttpResponse; 40, argument_list; 41, attribute; 42, identifier:get; 43, keyword_argument; 44, keyword_argument; 45, identifier:User; 46, identifier:objects; 47, identifier:facebook_id; 48, attribute; 49, identifier:status; 50, integer:400; 51, attribute; 52, identifier:id; 53, attribute; 54, identifier:user; 55, attribute; 56, identifier:signed_request; 57, identifier:request; 58, identifier:facebook
code: def deauthorize_application(request):
      """
      When a user deauthorizes an application, Facebook sends a HTTP POST request to the application's
      "deauthorization callback" URL. This view picks up on requests of this sort and marks the corresponding
      users as unauthorized.
      """
      if request.facebook:
          user = User.objects.get(
              facebook_id = request.facebook.signed_request.user.id
          )
  
          user.authorized = False
          user.save()
  
          return HttpResponse()
      else:
          return HttpResponse(status=400)