title: Django all auth with access token, what settings to test? (for app)
body: <p>My usecase: Let the user login from his android app &amp; get the access token, then pass it to django. More specifically to the code below.
  I have added my app's client ID and token using django admin (ie localhost/admin)</p>
  
  <p>My code</p>
  
  <pre><code>def facebook_login(request):
  
  access_token = request.POST['access_token']
  
  print(access_token)
  
  from allauth.socialaccount import providers
  from allauth.socialaccount.models import SocialLogin, SocialToken, SocialApp
  from allauth.socialaccount.providers.facebook.views import fb_complete_login
  from allauth.socialaccount.helpers import complete_social_login
  try:
      app = SocialApp.objects.get(provider="facebook")
      print(app)
      token = SocialToken(app=app,
                          token=access_token)
      print(token)
      login = fb_complete_login(app, token)
      login.token = token
      print(login)
      login.state = SocialLogin.state_from_request(request)
      ret = complete_social_login(request, login)
      print(ret)
      #if we get here we've succeeded
      return HttpResponse("success")
  except:
      # FIXME: Catch only what is needed
      return HttpResponse("failed")
  </code></pre>
  
  <p>How do I test if this works on my local machine? What settings do I need?</p>
  
  <p>Doing</p>
  
  <pre><code>c=Client()
  r=c.post('/login/',{'access_token':'adadasfvaera10238123094572zwcd'})
  </code></pre>
  
  <p>always fails for any access token I get from facebook. Where do I put in my application Id to enable this?</p>