So the discussion was going on which popular tags should we show in the social section of the application.
What I have thought is that there will be a cron job (located in src/cron/twitter.js) which will fetch first 100 or 1000 tweets from @fedora twitter handle and then we will search for the hashtags which are occuring maximum number of times in all the posts.
The top 3 to 4 hashtags with maximum count could be shown in the social section.
I have implemented the logic with my own twitter credentials here (for demo purpose) which will show the most used hashtags.
The reason for cron job is that it takes a plenty of time and there is API request limit on twitter so we should run the cron job in every hour or every 30 minutes which will store the maximum used hashtag in a file and then we can build an API endpoint which will read content from that file and serve on the app side.
I am designing the UI for this on a seperate PR if you all think this would be the best approach for this.
So the discussion was going on which popular tags should we show in the social section of the application.
What I have thought is that there will be a cron job (located in src/cron/twitter.js) which will fetch first 100 or 1000 tweets from @fedora twitter handle and then we will search for the hashtags which are occuring maximum number of times in all the posts.
The top 3 to 4 hashtags with maximum count could be shown in the social section.
I have implemented the logic with my own twitter credentials here (for demo purpose) which will show the most used hashtags.
The reason for cron job is that it takes a plenty of time and there is API request limit on twitter so we should run the cron job in every hour or every 30 minutes which will store the maximum used hashtag in a file and then we can build an API endpoint which will read content from that file and serve on the app side.
I am designing the UI for this on a seperate PR if you all think this would be the best approach for this.