I am using IFTTT (https://ifttt.com/) to fetch Twitter Tweets using the search function with #hashtag to my Discord server. Is there any way to exclude Retweets? Currently the whole server gets spammed with popular tweets, since it also fetches all the Retweets.
Tried studying Twitter API (https://developer.twitter.com/) and using stuff like -RT, exclude:replies and exclude:retweets. None of them worked.
Looks like -RT does work after all. I used quotation marks (as shown in IFTTT's own example) which broke the search function. Instead of using "#hashtag -RT" to fetch all the Tweets without Retweets, you should use #hashtag -RT, without quotation marks. Otherwise it won't fetch the Tweets at all.
Related
Hi currently I am using twitter search in Twitter4J and was wondering if there is any way I can query for getting tweets that starts with "User Mentions" or more logically # symbol.
The Twitter Search API doesn't contain anything which lets you search by where a character is in a tweet.
If you have a specific user in mind, you can find all the Tweets which have been sent to them (not just mentioning them) use the to: operator.
For example
https://twitter.com/search?q=to%3Aedent&src=typd
I'd like to only retrieve tweets that contain any hashtag in the Twitter Stream API. In the Search API, this can be done using 'filter:hashtags'.
I am using the locations filter and would like to also get tweets that contain the '#' character. Currently I get all tweets and I'd like to filter out the ones that do not contain a '#'. The 'term=#' doesn't seem to work.
Found this stale thread on the twitter dev forums https://dev.twitter.com/discussions/18787.
At this point I'm assuming it can't be done through the Stream API.
No, there isn't such a feature in the Streaming API.
You can refer to the documentation for a complete list of the available request parameters.
I'm trying to develop some code in order to get all the tweets that were generated with certain hashtags, then parse them and finally analyse them. I believe I've already thought and solve the last two parts of this but I'm having some trouble with the first one. I've already read the Twitter Search API documentation but I haven't realised yet how to do this. Can anyone help me?
If you want to retrieve the tweets sent recently, you should use the search/tweets endpoint of twitter' REST API, and mention the hashtag inside q parameter
In case you want to listen to tweets containing the hashtag and receive them in real time, then twitter's streaming API is what you should use (statuses/filter endPoint).
Have a look at the documentation on twitter's website, there's also plenty of information on how to do this all around the web.
I have a list of tweets that are using a hashtag I made. I'm getting these tweets using the search api. All I want is to get the number of retweets. I DO NOT need to post on their behalf. It seams ridiculous that I would need to have every single user login to my site, login to twitter and approve my application via OAUTH for EVERY TWEET IN MY LIST. There's gotta be a way to get that number without the need for oauth.
I tried getting it directly from the search api, but that's not consistently there. I've tried https://api.twitter.com/1/statuses/show/275729088709283840.json but that doesn't work, for some reason. Is there anyway to do this extremely simple task without going down the asinine road of user-interaction?
You have to create a background-process that uses the stream API. Phirehose is a php library that is set up to do this: https://github.com/fennb/phirehose
I'm using the following query:
https://twitter.com/search.json?callback=?&q=from:_adeel&count=5&include_entities=true&include_rts=true
and I would like to see the last 5 tweets from this user. You can see that the user has many more than 2 tweets yet the query only returns 2 tweets. I'm following the twitter search API and I fail to see what I'm doing wrong. I prefer to use the twitter search API because I want to perform the search on the client side without authentication and rate limits.
Do you see what I am doing wrong?
As indicated here in the documentation, the search API is an index of recent tweets, between 6-9 days old. It looks like the other tweets from the user you linked to are just outside this window.
So to summarize - you are not doing anything wrong. This is simply a limitation of the Twitter API.