[twitter-dev] Help parsing Latlon data from XML
Hi there, I've identified how to include the Geo-tagging information in the API, and having posted using tweetie 2.1 I see some tweets with the new data, which is excellent. But I'm having I bit of a problem parsing the latlon info out of the XML I have tried: var latlng = item.getElementsByTagNameNS(http://www.georss.org/ georss,point)[0].childNodes[0].nodeValue.split( ); var lat = latlng[0]; var lng = latlng[1]; and //var latlng = item.getElementsByTagName(georss:point)[0].childNodes [0].nodeValue.split( ); //var lat = latlng[0]; //var lng = latlng[1]; but neither seem to be helping. I'm able to extract the rest of the status data OK, using: var tweetText = item.getElementsByTagName(text)[0].childNodes [0].nodeValue; var tweetUsername = item.getElementsByTagName(name)[0].childNodes [0].nodeValue; var tweetUserAvatar = item.getElementsByTagName(profile_image_url) [0].childNodes[0].nodeValue; Do I need a condition to check for existence of the geo tags for each status, because I think it's failing to loop through tweets that don't include the geotagging data? If anyone is a whizz with extracting these particular tags, and can help I'd be enormously grateful. (the API call is HomeTimeline.XML btw) kind rgds, Chris.
[twitter-dev] Geo-enabled but only geo/ in xml
Hi there, I'm confused by the apparent status of geotagging in twitter. The API documentation only mentions it for status update and advice on geo-enabling in applications. So I enabled this on my profile and so am seeing the geo_enabledtrue/geo_enabled when using 'twitter.com/statuses/ user_timeline.xml' with basic authentication. But. There is pnly a single empty geo/ tag in the XML, no actual data at all. Does anyone know what is happening? Many Thanks, Chris.
[twitter-dev] Re: Geo-enabled but only geo/ in xml
HI there Raffi, below is a snippet of the home_timeline.XML (the last 8 lines for the status element). ... statuses_count317/statuses_count notificationsfalse/notifications geo_enabledtrue/geo_enabled verifiedfalse/verified followingfalse/following /user geo/ /status The update was added from twitter.com, so if the site itself doesn't supply the data, would you know which clients are populating geo data at this time? Kind Rgds, Chris. On Nov 29, 6:55 pm, Raffi Krikorian ra...@twitter.com wrote: the geotag needs to be passed in explicitly by the application doing the update http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses%C2%A0u... Hi there, I'm confused by the apparent status of geotagging in twitter. The API documentation only mentions it for status update and advice on geo-enabling in applications. So I enabled this on my profile and so am seeing the geo_enabledtrue/geo_enabled when using 'twitter.com/statuses/ user_timeline.xml' with basic authentication. But. There is pnly a single empty geo/ tag in the XML, no actual data at all. Does anyone know what is happening? Many Thanks, Chris. -- Raffi Krikorian Twitter Platform Team ra...@twitter.com | @raffi