Thanks for your help, Matias. Here's my solution so far. I've adjusted the Facebook backend example to save Twitter data, like so:
class UserProfile(models.Model):
# This field is required.
user = models.OneToOneField(User)
# Other fields here
twitter = models.TextField(blank=True)
def create_user_profile(sender, instance, created, **kwargs):
if created:
UserProfile.objects.create(user=instance)
post_save.connect(create_user_profile, sender=User)
from social_auth.signals import pre_update
from social_auth.backends.twitter import TwitterBackend
def twitter_extra_values(sender, user, response, details, **kwargs):
user_profile = user.get_profile()
user_profile.twitter = json.dumps(response)
user_profile.save()
return True
pre_update.connect(twitter_extra_values, sender=TwitterBackend)
In the twitter json, the profile_image_url and description fields have the image and bio.