Search particular user's timeline tweets by geo location twitter search API - ios

I am developing an iOS app which includes the search of user's tweets by geo location.
The Twitter search API returns all tweets those matches the particular location.
But i want to search the user's timeline tweets by geolocation.
My sample search URL is
https://api.twitter.com/1.1/search/tweets.json?adc=phone&count=50&geocode=37.178181%2C-96.054581%2C5794km
Anything i am missing here?
Any help would be much appreciated.
Thanks

Why don't you modify your search query by adding one parameter 'q=from:user_name' along with the other parameters you are using in your api at the moment.
This should provide you tweets from user_name in your given geo co-ordinates.
See the documentation for this(https://dev.twitter.com/docs/using-search)

Related

Twitter Search api - Tweets containing url are not returned in search result

I am using twitter rest api for reading user's twitter feed and searching tweets for specific hashtags. But twitter search api do not return tweets containing url in search result.
E.g. I have 2 tweets a) #hashtag b) #hashtag http://google.co.in/
below api returns only first tweet in search result
https://api.twitter.com/1.1/search/tweets.json?q=%23promojuice
Tweets containing any url are not returned in search result.
Does anyone have any clue about this?
This is because Twitter search API has a limit of 7 days. Check the API documentation
The Twitter Search API searches against a sampling of recent Tweets
published in the past 7 days.
The key word is sampling, Twitter Search API only returned what they consider relevant tweets.

Geolocate tweets from Twitter API - Spring social twitter

I want to get the coordinates of tweets longitude and latitude, but I don't know how to do it. How to get coordination of data from Twitter API?
HOw do we get the geolocation using Spring social twitter ?
The Tweet class doesn't define a getLocation method.
The geo information of a Tweet will be included when you request that specific tweet via the API, as documented here: https://dev.twitter.com/rest/reference/get/statuses/show/%3Aid
When you do searches for twitter with the searchOperation, it returns a org.springframework.social.twitter.api.Tweet Object which doesn't seem to have the location of the tweets.
However, the org.springframework.social.twitter.api.Tweet object has a
org.springframework.social.twitter.api.TwitterProfile object. The TwitterProfile Object has a location field, which is the users location.

Get a twitter timeline with only geotagged tweets

What I do need is to get the twitter timeline whith only tweets with location associated.
I know in Facebook it is possible using me/home?with=location, is there something like this for twitter?
You can use location in the Search and Streaming API:
locations for the Streaming API https://dev.twitter.com/docs/streaming-apis/parameters#locations
geocode for Search API https://dev.twitter.com/docs/api/1/get/search

Is there any way to get the list of 'followers/'following' and 'messages' in my Twitter app in iOS?

I am building a demo Twitter app. I have fetched the search results and timeline tweets. Is there any way to get the list of people I am following and my followers? And, can my messages be fetched too?
https://dev.twitter.com/docs/api/1/get/users/lookup
https://dev.twitter.com/docs/api/1/get/users/show
https://dev.twitter.com/docs/api/1/get/friends/ids
https://dev.twitter.com/docs/api/1/get/followers/ids
Check this links to know the parameters to get the list of followers and know the REST API link for retrieve the friends and followers.

find tweets mentioning any arbitrary twitter user

For statuses/mentions, I need to authenticate as a user. I want to see the user's mentions without asking him/her to authenticate. If the tweets are public, what are the mentions not public ?
I'm writing to do this
Check the Twitter search API
https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html
To find all user mentions: just use #username as search term.
I would like to add that Twitter's Search API returns only tweets from past 7 days. So if you want to retrieve ALL tweets mentioning an arbitrary user, you can't.If anyone finds a way to do this, please mention.
There is no way to get a user's mentions using the statuses/mentions endpoint because this is possible using the search api.
http://dev.twitter.com/doc/get/search

Resources