import tweepy import json import pandas as pd API_KEY = '' API_SECRET = ' ' access_token = '' access_token_seceret ='' auth = tweepy.OAuthHandler(API_KEY, API_SECRET) api = tweepy.API(auth)
Este código de aquí sigue dándome el siguiente error, ¿alguien puede ayudarme a descubrir cómo solucionar el problema? Soy nuevo en la codificación.
facebooktweets = api.user_timeline("Meta")
--------------------------------------------------------------------------- TweepError Traceback (most recent call last) <ipython-input-8-96959e05857f> in <module>() ----> 1 facebooktweets = api.user_timeline("Meta") 1 frames /usr/local/lib/python3.7/dist-packages/tweepy/binder.py in execute(self) 232 raise RateLimitError(error_msg, resp) 233 else: --> 234 raise TweepError(error_msg, resp, api_code=api_error_code) 235 236 # Parse the response payload TweepError: [{'message': 'You currently have Essential access which includes access to Twitter API v2 endpoints only. If you need access to this endpoint, you'll need to apply for Elevated access via the Developer Portal. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter- api#v2-access-leve', 'code': 453}]
Llama a la API v1.1. Pero la API v1.1 no está disponible en el acceso esencial. Use solo la API v2: tweepy.Client — Referencia de la API v2 de Twitter — tweepy