Noob Question: Python + Twitter + App Engine - Oauth

Sorry, but I am having problems implementing Oauth in my python project for my application.

I worked from http://github.com/tav/tweetapp , but I donโ€™t think I have a strong enough grip on this platform to understand how to implement this class in my main.py I am creating the rest of my application.

This may be a failed attempt, but here is what I still have:

    twa = twitter_auth

    client = twa.OAuthClient('twitter')

I created the source folder in my project called twitter_auth and it contains a file inside it called twitter_auth.py that contains the above linked library and a file called __ init __. Py (without a space) that is completely empty.

I really don't know what to do next: /

+3
source share
4 answers

Let me recommend a look at the tweepy library and some examples of tweepy applications. More specifically here: http://github.com/wasauce/tweepy-examples

This shows how to use oauth to authenticate the user: http://github.com/wasauce/tweepy-examples/tree/master/appengine/oauth_example/

+1
source

As Hagge said, it looks like your problem is more with the tweetapp library than with the App Engine. However, if you want to learn more about OAuth in App Engine, and if I am allowed to link to me, two related articles seem quite popular.

+1

I am not familiar with this library, but after a quick look and see the warning that it is not supported, I would look for something better. I implemented a simple Twitter connection based on Tornado auth: see an example of how to make Twitter API requests here (and an authentication example here ). If you do not want to use tipfy, I recommend implementing the python-twitter library in your sample.

0
source

Source: https://habr.com/ru/post/1755900/


All Articles