title: Accessing the json values on django template
body: <p>I have finally got a way to access the various values from the facebook using <code>django-allauth</code>. The only issue that I am facing is in the accessing of the values on the template.   </p>
  
  <p>Here is the <code>views.py</code>:  </p>
  
  <pre><code>from allauth.socialaccount.models import SocialToken
  
  import json
  import requests
  
  
  def fb_personality_traits(request):
      access_token = SocialToken.objects.get(account__user=request.user, account__provider='facebook')
      # print access_token.token
      requested_data = requests.get(
          'https://graph.facebook.com/me?access_token=' + access_token.token + '&amp;fields=id,name,email,posts,about')
      data_FB = json.loads(requested_data)
      return render(request, 'home/facebook_personality_traits.html', {'fb': data_FB})
  </code></pre>
  
  <p>Here is the template taht I am using to display the values:  </p>
  
  <pre><code>&lt;html&gt;
  
  
  &lt;body&gt;
  
   Welcome back {{ user.name }}
   {{fb.name}}
  &lt;!-- &lt;img src="" height="60" width="60"&gt; --&gt;
  
  
  &lt;a href="/"&gt;Home&lt;/a&gt;
  
  
  
  &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I am getting the following error:  </p>
  
  <p>Please let me know what to improve.</p>
  
  <p><a href="https://i.stack.imgur.com/ySmz8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ySmz8.png" alt="FB - ERROR"></a> </p>
  
  <p>** Error in text **</p>
  
  <pre><code>TypeError at /facebook_personality_traits/
  expected string or buffer
  Request Method: GET
  Request URL:    http://website:port/facebook_personality_traits/
  Django Version: 1.11.5
  Exception Type: TypeError
  Exception Value:    
  expected string or buffer
  Exception Location: /usr/lib/python2.7/json/decoder.py in decode, line 364
  Python Executable:  /usr/bin/python
  Python Version: 2.7.12
  Python Path:    
  ['/home/ubuntu/PersonalityWithFacebook',
   '/usr/lib/python2.7',
   '/usr/lib/python2.7/plat-x86_64-linux-gnu',
   '/usr/lib/python2.7/lib-tk',
   '/usr/lib/python2.7/lib-old',
   '/usr/lib/python2.7/lib-dynload',
   '/usr/local/lib/python2.7/dist-packages',
   '/usr/lib/python2.7/dist-packages']
  Server time:    Wed, 11 Oct 2017 11:00:14 +0000
  </code></pre>
  
  <p>This is the json I am storing in the json variable:  <a href="https://gist.github.com/JafferWilson/41e005d07beaa50a73c6901c3338990d" rel="nofollow noreferrer">gist of the json</a></p>