Hi there, When you're executing this Javascript, are you literally making the request to api.twitter.com/version/geo/search.json? -- It looks like you may have forgotten to replace "version" with "1" -- I get the callback when I execute a request like GET http://api.twitter.com/1/geo/search.json?query=love&rpp=10&callback=aCallback
Why are you passing rpp=10? I don't believe this method supports that parameter. Taylor On Mon, Jan 31, 2011 at 8:25 PM, Webdev <[email protected]> wrote: > How can i access the jsonp callback in twitter geocode api using > jquery especially lat and long values ? Once i get those values i will > try to show it on the google maps > > http://dev.twitter.com/doc/get/geo/search > > I was trying to access it but it wasnt returning any results. > > > $(document).ready(function() { > // Enable caching > $.ajaxSetup({ cache: true }); > > var query = "http://api.twitter.com/version/geo/search.json?q= > "; > query += "love&rpp=10&callback=?" > > > // Send JSON request > // The returned JSON object will have a property called "results" > where we find > // a list of the tweets matching our request query > $.getJSON( > query, > function(data) { > $.each(data.results, function(i, tweet) { > //console.log(tweet); > > // Before we continue we check that we got data > if(tweet.text !== undefined) { > // Calculate how many hours ago was the tweet > posted > var date_tweet = new Date(tweet.created_at); > var date_now = new Date(); > var date_diff = date_now - date_tweet; > var hours = Math.round(date_diff/ > (1000*60*60)); > > // Build the html string for the current tweet > var tweet_html = '<div class="tweet_text">'; > tweet_html += '<a href="http:// > www.twitter.com/'; > tweet_html += '/status/' + tweet.id + '">'; > tweet_html += tweet.text + '<\/a><\/div>'; > tweet_html += '<div class="tweet_hours">' + > hours; > tweet_html += ' hours ago<\/div>'; > tweet_html += '<div > class="tweet_img"><img src=' + > tweet.profile_image_url + '>'; > tweet_html += '<\/div>'; > > // Append html string to tweet_container div > $('#tweet_container').append(tweet_html); > } > }); > }); > }); > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
