开发者

using google maps and geo location of the tweet

开发者 https://www.devze.com 2023-02-18 05:24 出处:网络
How can I get the geolocation of each user\'s tweets? Using twitter API. Any example or samples out there?

How can I get the geolocation of each user's tweets? Using twitter API. Any example or samples out there?

Note: I am using jQuery and twitter API. I need to get each user longitude and latitude for the tweets everytime the user sends开发者_如何转开发 ones.


Geolocaction in Twitter is an "opt-in" feature. Most tweeters will not have opted-in, so they won't have geolocation data. You'll see this as their tweets will have a <geo_enabled> tag set to FALSE.

For those that have opted in (<geo_enabled> tag set to TRUE) you'll see a fully populated <geo> object at the end of the status e.g.

<status> 
   ... 
   <geo xmlns:georss="http://www.georss.org/georss"> 
     <georss:Point>37.780300 -122.396900</georss:Point> 
   </geo> 
</status>

See this page.

0

精彩评论

暂无评论...
验证码 换一张
取 消