[Fixed]-Using django-allauth for authorized Twitter API actions

1👍

For that you need to understand more about the Twitter APIs. Check the developer section of twitter and see available apis for pulling the data using access token. Once you’ve understanding on that, then what you need to do is just fetch the authenticated user access token like this (I’vent tested this but I hope this will work.)

social = user.social_auth.get(provider='twitter')
access_token = social.extra_data['access_token']['token']

Now you have the access_token on authenticated user so you can use any python library like requests, urllib2 or even there might be wrappers written on top of those and can pull the data. Hope this helps you. 🙂

Leave a comment