Hello ;
I want to use twitter streaming api V2. because the twitter plugin of logstash is not working with twitter api 2. I decided to use curl commands.
I defined the rules. like this:
curl --location --request POST 'https://api.twitter.com/2/tweets/search/stream/rules' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAJ****' \
--header 'Cookie: guest_id=v1%3A165697294294313514' \
--data-raw '{
"add":[
{
"tag":"test test",
"value":"hello"
}
]
}'
Then I have to execute a curl get , to fetch , in real time the tweets with Hello keyword.
The problem i faced is: I have to execute this curl command each xx seconds. it returns the tweets published in the time of execution. but i loose those published between the deadtime. i.e. between the two executions of the curl.
My question. is there any ways to run this curl command
curl --location --request GET 'https://api.twitter.com/2/tweets/search/stream?tweet.fields=created_at,geo,id,lang,text' \
--header 'Authorization: Bearer AAAAAAAAAAAAAAAAAAAAAJ8Rd***'
as a stream? using logstash , or python?
thanks