We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi guys
i'm using twitter4j to get tweets from a search. I wanna know what are the fields that the result provides. in almos all the examples around we see .getText() for the message .getUser().getScreenName() for the username .getCreatedAt() for the timestamp of the tweet
what else do we get from the search? it looks like it has a JSON Object syntax, is there any link where the full answer is mapped, so I could know what infos I can retrieve out of a simple rest Search?
tks
Answers
twitter4j javadoc suggests that the result of a Search is a QueryResult which contains a list of Status objects.
http://twitter4j.org/javadoc/twitter4j/api/SearchResource.html
http://twitter4j.org/javadoc/twitter4j/QueryResult.html
http://twitter4j.org/javadoc/twitter4j/Status.html
google is your friend
https://dev.twitter.com/overview/api/entities-in-twitter-objects
actually the whole documentation...
https://dev.twitter.com/overview/documentation
what i'm looking for is at the status page, also at the User Interface http://twitter4j.org/javadoc/twitter4j/User.html
I wasn't finiding it. Not very good at reading javadocs.
tks
also
https://gist.github.com/hrp/900964
https://gist.github.com/gnip/764239
yeah! thanks _vk. i'm kind of figuring out what and how we recive stuff from twitter.
You could just save a JSON from a very complete tweet that you post your self, I mean with all entities, like: @user, http:/someUrl, some pict/video/, etc.
Use JSONFactory (something like this... Don't remember exactly) in twitter4j.
this can save jsons from your timeline
and this can read them back and test several twitter4j's methods on an Status
that's a very comprehensive list of responses. my goal now is to geolocate the tweets, put them in a map. and also get more than 100 tweets for a determined search.
i'm using
}
I'm receiving a null Pointer for the doubles. maybe cause it's gettin a null result for location, lat and lon?
i put latitude and longitude under a conditional to get rid of thaerror, but i get another one that's not a programming issue. users are not putting their coordinates on the tweet...
http://stackoverflow.com/questions/26429965/twitter4j-count-the-number-of-tweets-within-24-hours-return-an-integer/26441898#26441898
https://dev.twitter.com/rest/public/search
from dev site:
twitter4j seems like is missing the geocoordinates. in the API https://dev.twitter.com/overview/api/tweets#obj-coordinates
they have estabilished the Coordinates field as a new coordinates system for the tweet instead of .getLatitude() and getLongitude() that are deprecated now.
You may like the google group for twitter4j
https://groups.google.com/forum/#!forum/twitter4j
and specifically
https://groups.google.com/forum/#!searchin/twitter4j/coordinates/twitter4j/9Y3SHWRrFxI/gCwIQiqcQJ4J
thanks. i'm messing around with the stream API right now. having some trouble dealing with data, specifically with displaying the data. i'm using the same format i posted in a few posts ago.
Note that Yusuke at tw4j forum is the developer of the library.
I just tested, and
status.status.getGeoLocation()
still working normally.the geoLocation() is working, but a lot of times is null. My intention is to put tweets in a map, but without the coordinates it wont happen. People on the twitterdev boards are also commenting the drop in the amount of tweets with geolocalization since a change at the mobile UI.
My self, I don't enable GeoLocation. Someone has talked about, without much precision, use the city or at least country data, to "geo" locate tweets, as most people do use this field.
And for the map part, I'd recommend you have a look in Unfolding Maps. If you haven't already.
I already used the Unfolding Maps in another project. It rocks.
Hi, i have the same problem , most people don't enable GeoLocation. This is my working [example] . How can i reverse the getLocation() to get Lat and Lon to use this instead getGeoLocation()?