Twitter User-App Authentication

Asked

Viewed 54 times

1

I am developing some Python scripts with the intention to bring specific tweets and perform further analysis, but I have doubts about the type of Twitter authentication.

As I noticed, there are two types of authentication, the User-Based Authentication and the User-App Authentication.

My question is directly related to the RATE LIMITS that the authentication types allow me. In User-Based I can bring 180 items to each Window (15 minutes) and the User-App allows me the number of 450 items.

What should I do to make the User-App Authentication? Because I only found information regarding User-Based.

Thank you!

1 answer

1

Use the twython. An example of use:

from twython import Twython, TwythonError

OAUTH_TOKEN = ''
OAUTH_TOKEN_SECRET = ''
APP_SECRET = ''
APP_KEY = ''

twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)

try:
    twitter.update_status(status='@MrMarcioPessoa isso funciona mesmo')
except TwythonError as e:
    print e

To obtain the contents of the variables APP_KEY, APP_SECRET, OAUTH_TOKEN and OAUTH_TOKEN_SECRET, follow the step by step of the website Twitter Application Management.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.