ozlerhakan / mongodb-json-files

:package: A curated list of JSON / BSON datasets from the web in order to practice / use in MongoDB
685 stars 951 forks source link

Tweets dataset origin #1

Closed brugner closed 4 years ago

brugner commented 7 years ago

Hi, it seems like a stupid question but I have to do it. Obviously this dataset has been obtained from Twitter, but can you tell me how? Thank you!

ozlerhakan commented 7 years ago

Hi @n6ither,

This is not a stupid question, thanks for asking it. It has been a while since fetching my twitter home page's tweets. I will explain the steps as much as I remember.

Firstly, you need to create your own twitter app on this page: https://apps.twitter.com/, because you are asked several tokens like Consumer Key and Access Token. You can use the API console after authenticating with your newly created Twitter API on https://dev.twitter.com/rest/tools/console using the https://api.twitter.com/1.1/statuses/home_timeline.json endpoint to get your current timeline tweets.

Another option is to use tools like cURL to retrieve the same data. I paste several resources about this approach:

  1. https://dev.twitter.com/oauth/overview/authorizing-requests
  2. https://gist.github.com/apolloclark/2d4f6362f31666c1c81f
  3. https://dev.twitter.com/rest/reference/get/statuses/home_timeline

I hope these help your need.

brugner commented 4 years ago

Thank you, this was helpful!