#51 Adding Tweets from Twitter with popular Hashtags
Opened by twishi. Modified
twishi/Fedora-app master  into  master

Download 51.patch

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.

thelittlewonder commented

I have implemented the logic with my own twitter credentials here

Posting the credentials on a public platform is highly insecure. Your twitter account may be easily compromised. Usually people grant wider scope to the application while generating the token, which might have access to even post through your account (POST statuses/update
).

  • Make sure that the key does not have write access to your account.
  • Posting Key publically on the internet means that anyone can use that key and exhaust your limit.

Cheers :-)

I understand posting such information is highly insecure. I posted it here with only Read Access so everyone can test easily.

I was waiting for review from someone then I had planned to refresh the tokens.

Metadata