-
Notifications
You must be signed in to change notification settings - Fork 3
Home
The OSoMeTweet project intends to provide a set of tools to help researchers work with Twitter's V2 API. The Wiki provides detailed instructions about the tools and will also work as an unofficial archive of knowledge gathered by people throughout the process.
In the sidebar, you should see links to pages that are prefixed with either "Info" or "Method". Info pages are simply archived knowledge that we found useful and Method pages detail how to use some portion of the osometweet
package.
Each section below describes some portion of the package (as well as the information in this Wiki) and links to more details.
See the README.md page to learn how to install the osometweet
package.
Before you can gather any data from Twitter, you must create an authentication object.
See page Method: Authentication for instructions on how to create an authentication object and use it to initialize the OsomeTweet
class.
- Method: Search Endpoints - Access the recent search endpoint or the full archive search endpoint.
Streaming endpoints allow you to collect tweets in real-time.
- Method: Streaming - Collect tweets using either the filtered stream (tweets that match user-provided criteria) and sampled stream (a general 1% sample of all Twitter activity) endpoints.
Tweet endpoints allow you to download tweets using the API.
Here are the endpoints currently supported by osometweet
:
- Method: Tweet lookup - Gather data on specific tweets.
- Method: Timelines - Gather tweets sent by a specific user or mentioning a specific user.
User endpoints allow you to download user information using the API.
Here are the endpoints currently supported by osometweet
:
-
Method: User lookup - Gather account data about specific users (using their
user_id
orusername
). - Method: Follows lookup - Download all users that a specific user follows (following), or is followed by (followers).
V2 API, by default, only returns limited information.
To fetch more, you will need to specify the fields
and expansions
parameters in the requests.
OSoMeTweet
contains several classes to handle them.
See Method: Specifying fields and expansions for examples of how to work with them.
osometweet
offers some utility functions to make your life easier, see Method: Utility functions for details.
osometweet
offers some functions for data cleaning that we hope will make your life easier. See Method: Wrangle Functions Intro for an introduction to these methods and check out Method: Wrangle Practical Walk through (flatten_dict) for a more in-depth and practical application of the flatten_dict
method.
Functional scripts which use the osometweet
package can be downloaded from the examples/
folder.
-
Info: Twitter API v2 Sample Code - This is code written by some Twitter folks and does not use
osometweet
. - Info: HTTP Status Codes and Errors
-
Info: Available Twitter API V2 Endpoints - A list of Twitter's available endpoints, noting which are currently supported by
osometweet
. - Info: Available Fields and Expansions
- Info: Academic Track Details
- Info: Academic Track Benefits