bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 955 forks source link

Keys don't map correctly #685

Open David-OConnor opened 3 years ago

David-OConnor commented 3 years ago

Hi. The documentation implies you get started like this:

        api = twitter.Api(consumer_key=[TWITTER_KEY],
                          consumer_secret=[TWITTER_SECRET],
                          access_token_key=[TWITTER_TOKEN],
                          access_token_secret=[access token secret]
        )

However, the keys that Twitter provides aren't these; they're API key, API key secret, and Bearer token. I've tried a few combinations, but can't get it to work.

David-OConnor commented 3 years ago

Got it working using these official examples. Is this package out of date?

alvarolloret commented 3 years ago

Thanks @David-OConnor, same issue here!

heikomania commented 3 years ago

These are the keys for the v2 API. API Key & API Key Secret map to consumer_key and consumer_secret. You have to generate the access_token_key and access_token_secret in the developer portal under your app -> Keys and tokens.