Twitter-API-v2-sample-code
Twitter-API-v2-sample-code copied to clipboard
Sample code for the Twitter API v2 endpoints
``` import requests import os import json # To set your environment variables in your terminal run the following line: # export 'BEARER_TOKEN'='' bearer_token = "XXXXXXXXXXXXXXXXXXXXXXXX" search_url = "https://api.twitter.com/2/tweets/counts/recent" #...
This issue pertains to issue #69. This problem has been present since 2021 but has yet to be resolved. Testing through sample code or Postman yields the same result. The...
**Describe the bug** [Getting Tweets with Bearer token](https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Tweet-Lookup/get_tweets_with_bearer_token.js) is not working. It returns 403 Forbidden with the following response body: ```json { "client_id": "28572299", "detail": "When authenticating requests to the...
I'm following this [twitter api documentation][1] to get detailed information for a tweet, but I can't seem to get the full tweet details (retweet count, hearts, geotags etc etc) with...
**Describe the bug** Stream encountered HTTP error: 403 HTTP error response text: {"client_id":"*******","detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter...
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /2/tweets (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 101] Network is unreachable'))
 python3 -m venv venv source venv/bin/activate
- [x] **Describe the bug**cx[]() A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: - **Expected behavior @andypiper a** A clear and...
**Describe the bug** I'm using v2 APIs and keep getting this error when calling https://api.twitter.com/2/users/{userid}/following I'm on basic level so should have access to this one. Some other API calls...