title: Get user uid from Facebook with Django Social Auth
body: <p>I'm trying to get the user profile picture from Facebook with django-social-auth.</p>
  
  <p>I saw in an other post, that I should get the user uid from Facebook to have access to the profile picture.
  How can I get the uid?</p>
  
  <p>From django-social-auth I just installed it and configured the basic stuff to login/logout with django-registrations.</p>
  
  <p>This is my html to login:
  Login with FB</p>
  
  <p>How can I do a request to a 'home' view to the user in facebook and get the uid?</p>
  
  <p>I found this in the django-socail-auth docs:</p>
  
  <pre><code>def social_associate_and_load_data(backend, details, response, uid, user,
                                     social_user=None, *args, **kwargs):
      """
      The combination of associate_user and load_extra_data functions
      of django-social-auth. The reason for combining these two pipeline
      functions is decreasing the number of database visits.
      """
      extra_data = backend.extra_data(user, uid, response, details)
      created = False
      if not social_user and user:
          social_user, created = UserSocialAuth.objects.get_or_create(
              user_id=user.id,
              provider=backend.name,
              uid=uid,
              defaults={'extra_data': extra_data})
  
      if not created and extra_data and social_user.extra_data != extra_data:
          social_user.extra_data.update(extra_data)
          social_user.save()
      return {'social_user': social_user}
  </code></pre>
  
  <p>Where should I put it in my django app? In views.py? If it yes, how can I activated the view, if I'm just logging in with commom social-auth urls.</p>