-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathformat.php
43 lines (27 loc) · 894 Bytes
/
format.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script>
function twitter2format(raw)
{
raw=raw["statuses"];
format=[];
var ligne=0;
for( i=0; i<raw.length ;i++)
{
if(raw[i]["coordinates"] !== undefined && raw[i]["coordinates"] !== null )
{
format.push({});
format[ligne]['contenu']= raw[i]["text"];
format[ligne]['locx']= raw[i]["coordinates"]["coordinates"][1]; // A CHANGER
format[ligne]['locy']= raw[i]["coordinates"]["coordinates"][0]; // IDEM
format[ligne]['url']="https://twitter.com/#!/"+ raw[i]["user"]["id_str"] + "/status/"+raw[i]["id_str"];
//format['contenu']= "https://twitter.com/intent/user?user_id="+raw[ligne]["user"]["id"];
format[ligne]['user']= raw[i]["user"]["name"];
format[ligne]['date']= raw[i]["created_at"];
format[ligne]['mail']= "";
format[ligne]['source']= "Twitter";
ligne++;
}
}
raw=[];
return format;
}
</script>