Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5988597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:58:50+00:00 2026-05-22T22:58:50+00:00

Using django-social-auth to grab user data from facebook, it is returning a list of

  • 0

Using django-social-auth to grab user data from facebook, it is returning a list of dicts in a unicode string. For example, response.get(‘education’) for a user is returning:

u”[{u’school’: {u’id’: u’12345′,
u’name’: u’Joe Thiesman High’},
u’type’: u’High School’}, {u’school’:
{u’id’: u’23456′, u’name’: u’Joe
Montana University’}, u’type’:
u’College’}]”

I want to convert this from a string to a list where I can extract the data, but am struggling. An answer to a similar question (String to Dictionary in Python) advised using:

foo=json.loads(string)

but that fails because its a list with nested dicts, 1 for each school, rather than just a dictionary, and it seems to be getting confused. the error im getting is:

ValueError: Extra Data: line 1 column 73 – line 1 column 144

Originally, I was getting a ValueError: Expecting Property Name: line 1, column 2, until I used string.replace() to exchange the ” with ‘, and vice-versa. That did get rid of that error, but I mention in case that wasn’t the correct solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:58:51+00:00Added an answer on May 22, 2026 at 10:58 pm

    Take a look at the answer to this question :

    Convert a String representation of a Dictionary to a dictionary?

    The use of python’s ast.literal_eval might be very useful to you. It is also a lot safer to use than eval because it only will evaluate python data literals (strings, tuples, etc…) but not executable code.

    See ast.literal_eval in the python docs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using django-social-auth (https://github.com/omab/django-social-auth), with some success - logging in from Twitter and
Under Django 1.1.1, I am using several authentication backends such as social-registration for facebook
I'm using django-socialregistration to manage my site's connection with Facebook. When a user clicks
We are using django and django-socialauth for auth with google/fb/twitter but there is a
I read from http://www.packtpub.com/article/friends-via-email-social-web-application-django-1.0 and follow the steps: => And change my setting.py SITE_HOST
I'm working on a user based, social networking type of web application in Django.
Im using Django 1.2.3. I have login functionality in my site using django.contrib.auth.views.login .
I'm currently working on a social web application using python/django. Recently I heard about
Using django-contact-form , I have overridden the form class: from contact_form.forms import ContactForm from
Learning django from learning website development using django. In chapter 3, building a bookmark

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.