Questions tagged [twitter-api-v2]
231 questions
0
votes
1 answer
Twitter API v2, how can I set a maximum on the number of tweets I want to scarpe
I would like to scrape only 2.000 tweets each day related to a specific query (in this example it's tesla). Do you guys know a way to set a maximum to the number of tweets I can scrape?
This is my code below without the access keys to my Academic…
0
votes
1 answer
Geolocation of twitter users from tweets
I would like to retrieve the GPS longitude and latitude coordinates of Twitter users from the posts. I needed high granular geolocations, so want to collect tweets whose location
is automatically recorded by Twitter trough the GPS and not…

arilwan
- 3,374
- 5
- 26
- 62
0
votes
0 answers
How to avoid retrieving previous tweets pulled from Twitter API V2
I am using the Twitter V2 API, is it possible to avoid retrieving tweets that was already retrieved from the Twitter API. For example would it be possible to only retrieve tweets that weren't already pulled from Twitter using the V2…

Coder3000
- 119
- 2
- 7
0
votes
1 answer
How to stream a specific user_id by tweepy?
I'm trying to reach out an event to recognize whenever specific user tweets , so im using stream.filter in tweepy , just like
class IDPrinter(tweepy.StreamingClient):
def on_tweet(self, tweet):
print(tweet)
printer =…

SelvsterTP
- 19
- 3
0
votes
1 answer
How to extract image url from twitter api using twitter java SDk
I have been trying to extract the image url from twitter api's search tweets with Id response.
The url are present in the Json response from the api in the includes->media array in the response.
But when I try to get it using the twitter java Sdk it…

Shivam Kumar
- 7
- 1
0
votes
1 answer
How to only get the last 5 minutes tweets from Twitter API
I am using the twitter V2 API, how would I be able to only get the last 5minutes tweets from the api, using https://api.twitter.com/2/users/:id/tweets link

Coder3000
- 119
- 2
- 7
0
votes
2 answers
get replys to a specific tweet with twitter api v2
anyone knows how to get a the relys for a specific tweet by it's ID maybe? i been trying but can't find any on the tweepy docs not discord's, can't seem to find anything about how to do it with twitter api v2, also is there a way to requests latest…

AD DAB
- 60
- 1
- 6
0
votes
1 answer
NodeJS Twitter API get liked tweets count
I'm trying to get the number of tweets a user has ever liked in NodeJs using twitter-api-v2, but I can't seem to find the solution. I tried to use the "public_metrics" property but it looks like it only contains the following properties:
followers…

Redy
- 56
- 1
- 8
0
votes
0 answers
How can i run a config file multiple times with a different parameter each time in Python?
I'm working on the Twitter API to find the follower list for each user I have in my db. To do this, I have a script with the following parameters:
mongodb_tweets:
url: mongodb://localhost:27017/
database: hatemap
collection: p
mongodb_users:
…

Marco Sallustio
- 1
- 1
0
votes
0 answers
Twitter API v2 integration with laravel 8 usign atymic
I am trying to use the Twitter API v2, but every time I do run on the site, I get an error:
Atymic\Twitter\Exception\Request\UnauthorizedRequestException
A request error occurred. Client error: GET…

Austin Sanga
- 13
- 5
0
votes
1 answer
How to securely store refresh tokens in mongodb database
I'm trying to tweet on behalf of Twitter user using How to connect to endpoints using OAuth 2.0 Authorization Code Flow with PKCE.
A refresh token allows an application to obtain a new access token without prompting the user.
In order to post on…

Dashiell Rose Bark-Huss
- 2,173
- 3
- 28
- 48
0
votes
1 answer
What is the most efficient way of frequently getting the last tweets from 1000+ accounts using Twitter API?
I have a list of approximately 1.500 twitter accounts (that may or may not have tweeted) for which I want to retrieve the last (max 100 tweets) every ~20 minutes. Considering the rate limits of Twitter API v.2, what is the most efficient way of…

Christoffer
- 2,271
- 3
- 26
- 57
0
votes
1 answer
Twitter API v-2 not giving me access
I have been trying to access twitter's API. I only wanted to see trending news or just news but it is always giving me this error on Penter image description hereostman.
I have tried a lot of the endpoints specified on Twitter's website for…

Leal_em
- 9
- 3
0
votes
1 answer
How to query Twitter API public metrics for multiple `tweet_id`s using Tweepy
GOAL
Use Tweepy to to call the Twitter API to return the public_metrics (likes, retweets, quotes, replies) for each of multiple tweet_ids.
SOLUTION
client = tweepy.Client(bearer_token, wait_on_rate_limit=True)
gathered_tweets = []
for response in…

dsx
- 167
- 1
- 12
0
votes
0 answers
I cannot create tweets using the tweepy module in python
recently, I've started learning the tweepy module. I decided to create a simple Twitter Bot that will tweet, like and retweet. However, I still struggle to actually create a tweet. Whenever I try to use the .create_tweet() method, it throws an error…

Mike_Ś
- 1
- 3