jquery - Get latest tweets through twitter search not working? -


i'm using following code latest tweets specific hashtag

$(document).ready(function(){ getlatesttweets(); function getlatesttweets(){     var url = "http://search.twitter.com/search.json?q=%23syria&result_type=recent&rpp=3&callback=?";      $.getjson(url, function(json){         alert('reached');         var html = '<ul>';         $.each(json.results, function( key, result){             html += '<li><a href="#">' + '> ' + result.text + ' ...' + '</a></li>';          });         html += '</ul>';         $('#archive-twitter').append(html);     }); } });   

this code working fine 2 days ago stopped working today. getjson method won't succeed though when use following link

http://search.twitter.com/search.json?q=%23syria&result_type=recent&rpp=3

in browser actual json data

i don't know problem?

update: added test link clarify problem http://latakiancoder.com/twitter-test.php

i've tried proxified server side request , works:

js code:

$(document).ready(function(){                 getlatesttweets();                 function getlatesttweets(){                     var url = "http://search.twitter.com/search.json?q=%23syria&result_type=recent&rpp=3";                      $.getjson("proxy.php", { url: url }, function(json){                         var html = '<ul>';                         $.each(json.results, function( key, result){                             html += '<li><a href="#">' + '> ' + result.text + ' ...' + '</a></li>';                          });                         html += '</ul>';                         $('#archive-twitter').append(html);                     });                 }             });   

proxy.php code:

<?php     $url = $_get['url'];     $json = file_get_contents($url);     echo $json; ?> 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

How to call a javascript function after the page loads with a chrome extension? -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -