🌎 Track Twitter Trends of any country or town in the world

The Problem

When it comes to viewing what’s trending on twitter of some other location other than your own it’s very hard. Also, you can’t really see twitter trends below 30 or sometimes 10 even after changing the location.

The s…



The Problem

When it comes to viewing what’s trending on twitter of some other location other than your own it’s very hard. Also, you can’t really see twitter trends below 30 or sometimes 10 even after changing the location.



The solution

Even though there were solutions there I still wanted to work with twitter API to provide everything for free and in better UI than everybody else and if you ask me at the end I did. Here’s how?

The first thing I did was to get the approval of twitter developers API. Then I used the api to get the JSON data of all the countries and town in the world that are live. You can get upto 50 trends for any country and town.

Now, I created a search bar using AJAX + PHP because I wanted to filter and echo results based upon users input. You can try typing your country or town to see what’s trending there right now. It works amazing even I like it even after developing it. Link is in twitter trends above you will find as there is a single link in this post.

I also added an Index page so that the user can see how many countries and towns we can track. Right now you can see twitter trends of 62 countries and 462 towns on global twitter trends. These are live and are updated every 30 minutes.

I created a HTML table to echo JSON data of each country and town but there was a problem it used to get unresponsive on small screens I handled this by changing table design when users uses it on small screens. You can see yourself. For this I used media tag in css.

I used w3css framework in order to make the entire design because I liked it. It was fast.

Logo is simply created on canva if you are interested in that too.

That’s it using all the things above I created global twitter trends.

I would love to interact with anyone on dev.to so please ask question in comments.


Print Share Comment Cite Upload Translate
APA
Ayush Singh | Sciencx (2024-03-29T05:56:45+00:00) » 🌎 Track Twitter Trends of any country or town in the world. Retrieved from https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/.
MLA
" » 🌎 Track Twitter Trends of any country or town in the world." Ayush Singh | Sciencx - Saturday November 20, 2021, https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/
HARVARD
Ayush Singh | Sciencx Saturday November 20, 2021 » 🌎 Track Twitter Trends of any country or town in the world., viewed 2024-03-29T05:56:45+00:00,<https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/>
VANCOUVER
Ayush Singh | Sciencx - » 🌎 Track Twitter Trends of any country or town in the world. [Internet]. [Accessed 2024-03-29T05:56:45+00:00]. Available from: https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/
CHICAGO
" » 🌎 Track Twitter Trends of any country or town in the world." Ayush Singh | Sciencx - Accessed 2024-03-29T05:56:45+00:00. https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/
IEEE
" » 🌎 Track Twitter Trends of any country or town in the world." Ayush Singh | Sciencx [Online]. Available: https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/. [Accessed: 2024-03-29T05:56:45+00:00]
rf:citation
» 🌎 Track Twitter Trends of any country or town in the world | Ayush Singh | Sciencx | https://www.scien.cx/2021/11/20/%f0%9f%8c%8e-track-twitter-trends-of-any-country-or-town-in-the-world/ | 2024-03-29T05:56:45+00:00
https://github.com/addpipe/simple-recorderjs-demo