Geolocate tweets from Twitter API - Spring social twitter - 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.

Related

How to locate Venue Map using eventbrite Api in other app

I'm trying to integrate eventbrite's events in my app. I want to locate Event's venue map and not able to fetch venue map's image from any eventbrite's api.
Anyone have idea?
thanks!
Eventbrite uses the venue's latitude and longitude to call the Google Maps API and get the map, thus it's not stored by EB and cannot be retrieved via the API. You can call the Google Maps API and retrieve it yourself though.

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

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)

Post Tweet as other user using Twitter API?

I've sorted the OAuth Twitter stuff and currently all my application does is grab Tweets and display them on a web page. After the user has given permission for my application to use their account, is there a way to post a Tweet on their behalf i.e. post AS them?
First point of call would be reading here - https://dev.twitter.com/docs/auth/oauth/oauth-echo

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

What's the API to undo retweets (unretweet) in Twitter?

What's the REST API call required to undo/remove/destroy/delete a retweet (of another user) from the authenticated user's timeline? There's simply no mention of this in the API documentation on the Twitter website.
Native retweet has all attributes of a simple tweet including a unique ID. So, you can use statuses/destroy method to remove it.
How to get that ID depends on your application. First, it's returned by statuses/retweet method. Second, you can get user's timeline and parse out ID of this tweet.

Resources