ALI*_*san 10 python twitter jupyter-notebook
import tweepy\nimport json\nimport pandas as pd\n\nAPI_KEY = \'\'\nAPI_SECRET = \' \'\naccess_token = \'\'\naccess_token_seceret =\'\'\n\nauth = tweepy.OAuthHandler(API_KEY, API_SECRET)\n\napi = tweepy.API(auth)\nRun Code Online (Sandbox Code Playgroud)\n这里的代码一直给我下面的错误,任何人都可以帮我弄清楚如何解决这个问题吗?我是编码新手。
\nfacebooktweets = api.user_timeline("Meta")\nRun Code Online (Sandbox Code Playgroud)\n ---------------------------------------------------------------------------\n TweepError Traceback (most recent call last)\n <ipython-input-8-96959e05857f> in <module>()\n ----> 1 facebooktweets = api.user_timeline("Meta")\n\n 1 frames\n /usr/local/lib/python3.7/dist-packages/tweepy/binder.py in execute(self)\n 232 raise RateLimitError(error_msg, resp)\n 233 else:\n --> 234 raise TweepError(error_msg, resp, api_code=api_error_code)\n 235 \n 236 # Parse the response payload\n\n TweepError: [{\'message\': \'You currently have Essential access which includes access \n to Twitter API v2 endpoints only. If you need access to this endpoint, you\xe2\x80\x99ll need \n to apply for Elevated access via the Developer Portal. You can learn more here: \n https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter- \n api#v2-access-leve\', \'code\': 453}]\nRun Code Online (Sandbox Code Playgroud)\n
小智 3
它调用 v1.1 API。但 v1.1 API 在 Essential 访问中不可用。仅使用 v2 API:tweepy.Client \xe2\x80\x94 Twitter API v2 参考 \xe2\x80\x94 tweepy
\n