Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Post to Facebook/Twitter using Django?

Tags:

django

Maybe I've already found the answer on Google but I don't recognize it so I resort to you guys.

What packages do I need? A tutorial would be awesome. Thanks in advance!

like image 321
john2x Avatar asked Dec 17 '25 16:12

john2x


2 Answers

A package such as django-socialregistration would allow you to authenticate with both.

Alternatively, you could roll your own using one of these:

  • Facebook python-sdk
  • python-twitter
like image 76
Dolph Avatar answered Dec 19 '25 06:12

Dolph


You want Twython:

https://github.com/ryanmcgrath/twython-django/blob/master/twython_django_oauth/views.py

Believe me, I have been down this road, and the example Django views in the link above are the most straightforward of twitter oauth2 examples.

See also https://github.com/ryanmcgrath/twython

like image 36
fish2000 Avatar answered Dec 19 '25 05:12

fish2000