0

I was just wondering if an app exists for Django that helps connecting all 3 social networks, imports basic info, profile picture, but most importantly pushes the post user makes to these three website accounts. I looked into django-social-auth but that just lets you register or login with these websites,not push posts.

Jonathan
  • 2,728
  • 10
  • 43
  • 73

2 Answers2

1

There are django apps that do what you need individually (Facebook example), but I'm not aware of one that works with multiple.

django-social-auth will get you half way there by obtaining the users information and permission to post to the social network on their behalf.

Once you have users authenticating via django-social-auth you'll have access to the users access token needed to post to respective network on their behalf.

From there, you're going to have to stitch together some additional python modules like the Facebook example above to do the actual posting.

Scott Woodall
  • 10,456
  • 6
  • 39
  • 37
1

django-allauth http://github.com/pennersr/django-allauth/ stores basic info for FB/G/Tw (and more), provides basic access to the profile picture, and stores the access tokens in the database.

Whatever you do with the access token is project specific and beyond allauth scope. For example, in order to post to the users wall you need:

  1. The user's permission (you can do this by configuring the proper scope for the Facebook provider, search for SCOPE in the README.txt)

  2. Once the user is logged in via FB, the access token is stored in allauth.socialaccount.models.SocialToken. Simply lookup the token for the user that is logged in.

  3. Then, given the token use whatever method you like to post to the Facebook API on behalf of the user. E.g. https://github.com/pythonforfacebook/facebook-sdk

For some more background on the relation between a Django user and the Social* models, see:

How can I get the user's facebook id with django-allauth?

Community
  • 1
  • 1
pennersr
  • 6,306
  • 1
  • 30
  • 37