Skip to content
Matthew R. DeVerna edited this page Feb 16, 2021 · 37 revisions

Introduction

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.

osometweet package examples

Install

For instructions like how to install the package, see the README.md.

Scripts

Functional scripts which use the osometweet package can be downloaded from the examples/ folder.

Authentication

Before you can gather any data from Twitter, you must create an authentication object. See page Authentication for instructions on how to create an authentication object and use it to initialize the OsomeTweet class.

Search Endpoints

Tweet endpoints

Tweet endpoints allow you to download tweets using the API. Here are the endpoints currently supported by osometweet:

User endpoints

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 or username).
  • Method: Follows lookup - Download all users that a specific user follows (following), or is followed by (followers).

Fields & expansions

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 Specifying fields and expansions for examples of how to work with them.

Utility Methods (osometweet.utils)

osometweet offers some utility functions to make your life easier, see Utility functions for details.

Official Twitter Documentation