I can't get any data using the query
http://api.twitter.com/1/trends/:woeid.format
(from this page: https://dev.twitter.com/docs/api/1/get/trends/%3Awoeid)
When I check what trends you guys have available using
http://api.twitter.com/1/trends/available.xml
I can see a lot of cities are available. Tampa, for example.
If I try to query for Tampa using
http://api.twitter.com/1/trends/:2503863.xml
I get a response like:
"No data for WOEID"
Actually, I get always "no data". No matter what WOEid I use.

Replies
Hi @ibias,
You've got an extra colon in your URL there (the ":" in our documentation is a sign that field is inline token in the path).
https://api.twitter.com/1/trends/2503863.xml is the URL you want, and it returns something like this right now:
<matching_trends type="array"><trends as_of="2011-08-04T15:43:18Z" created_at="2011-08-04T15:42:01Z"><locations><location></location></locations></trends></matching_trends>xml does not work why?
See https://dev.twitter.com/discussions/835
Twitter have removed support for the XML endpoint.
I'm annoyed by this as when I read the announcement I thought I was fine because I switched to WOEID trends a long time ago.
I missed the bit about XML being removed too and now have 3 broken apps with many thousands of users until Apple approve the update at least 1 week wait.
I don't understand why the need to remove XML endpoints (surely the code is reusable enough to output in multiple formats?)
is possible to consult with .php that I want to move the channels TT to a .txt
<head></head><body><div id="trends"></div><script>function onTrendData(data) {var parent = document.getElementById("trends");for (var loc = 0; loc < data.length; loc++) {for (var i = 0; i < data[loc]["trends"].length; i++) {var trend = document.createElement("div");var anchor = document.createElement("a");parent.appendChild(trend);trend.appendChild(anchor);anchor.textContent = data[loc]["trends"][i]["name"];}}}</script><!-- Change 1.json to the appropriate locale code, as describedhttps://dev.twitter.com/docs/api/1/get/trends/%3Awoeid --><script src="https://api.twitter.com/1/trends/1.json?callback=onTrendData"></script></body><?php
{
$desc = fopen("trends.htm", "r");
$escr = fopen("fichero.txt", "w") or die ("no se puede crear!!!");
while (!feof($desc))
{
$linea = fgetss($desc, 256, "");
echo $linea;
fputs ($escr, trim($linea)." ");
}
fclose($escr);
fclose($desc);
}
?>
myself clear?
I copy this happens to txt
function onTrendData(data) { var parent = document.getElementById("trends"); for (var loc = 0; loc < data.length; loc++) { for (var i = 0; i < data[loc]["trends"].length; i++) { var trend = document.createElement("div"); var anchor = document.createElement("a"); parent.appendChild(trend); trend.appendChild(anchor); anchor.textContent = data[loc]["trends"][i]["name"]; } } }
no way to make an appointment with php
-
:-P
Tks.
xml does not work why?
See https://dev.twitter.com/discussions/835
Twitter have removed support for the XML endpoint.
I'm annoyed by this as when I read the announcement I thought I was fine because I switched to WOEID trends a long time ago.
I missed the bit about XML being removed too and now have 3 broken apps with many thousands of users until Apple approve the update at least 1 week wait.
I don't understand why the need to remove XML endpoints (surely the code is reusable enough to output in multiple formats?)
Sorry that you did not notice that part of the announcement, Richard.
We've been favoring JSON formats for all of our APIs for some time now -- supporting multiple formats can be a burden in a few different ways, especially for the Trends API. XML usage was comparatively minuscule to JSON usage and we got little to no complaints when we announced it in August.
sir i want to make a program which can drag the twitter trends but it show only countries not there trends my progrem coding is here: plz check it and tell me my mistake
<head><script type="text/javascript">{var str=document.getElementById("");{document.getElementById("txtHint").innerHTML="";{ // code for IE7+, Firefox, Chrome, Opera, Safari{ // code for IE6, IE5xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");{if (xmlhttp.readyState==4 && xmlhttp.status==200){document.getElementById("txtHint").innerHTML=xmlhttp.responseText; //response from serverxmlhttp.open("GET","https://api.twitter.com/1/trends/"+str+".json",true); //request send to server</script></head><body><form action="" size="6"><select name="country" onchange="showTrend(this.value)"></select></form><br /></select></body>