PHPackages                             webiny/twitter-oauth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. webiny/twitter-oauth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

webiny/twitter-oauth
====================

Webiny Twitter OAuth Component

v1.6.1(8y ago)121MITPHPPHP ^7

Since Sep 20Pushed 8y ago8 watchersCompare

[ Source](https://github.com/Webiny/TwitterOAuth)[ Packagist](https://packagist.org/packages/webiny/twitter-oauth)[ Docs](http://www.webiny.com/)[ RSS](/packages/webiny-twitter-oauth/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (5)Versions (23)Used By (0)

TwitterOAuth
============

[](#twitteroauth)

This component provides is a wrapper for Twitter OAuth server.

Install the component
---------------------

[](#install-the-component)

The best way to install the component is using Composer.

```
composer require webiny/twitter-oauth
```

For additional versions of the package, visit the [Packagist page](https://packagist.org/packages/webiny/twitter-oauth).

Configuring the component
-------------------------

[](#configuring-the-component)

To use the component, you first need to configure it. The configuration is done by defining the following params:

- **ClientId** - Twitter client id
- **ClientSecret** - Twitter client secret
- **RedirectUri** - location where the user will be redirected by the OAuth server, once he is authorized

### Example configuration:

[](#example-configuration)

```
    TwitterOAuth:
        MyTwitterApp:
            ClientOd: AJmIXgXfaasdasaULBmnygIiGA
            ClientSecret: JE5dpb0a891ciisasdMOu7ELF9SI0TazR3hDAirft0Y
            RedirectUri: /security/login-tw/
        Bridge: \Webiny\Component\TwitterOAuth\Bridge\TwitterOAuth\TwitterOAuth
```

### Dependency

[](#dependency)

The library requires `abraham/twitteroauth` TwitterOAuth component. The will be installed automatically if you install TwitterOAuth Webiny component using composer, however, you will need to include this file somewhere in your application before you can use the component `/path/to/abraham/twitteroauth/twitteroauth.php`.

Usage
-----

[](#usage)

Once you have configured the component, its usage is fairly simple if you have an access token. If you don't have an access token, the best way to get one, is to authenticate the user using the `Security` component with TwitterOAuth as auth provider.

```
$tw = TwitterOAuthLoader::getInstance('MyTwitterApp');

$tw->setAccessToken(...);

// get user details for current access token
$user = $tw->getUserDetails(); // returns TwitterOAuthUser object

// perform any other API operation
$tw->get($url, $params);
$tw->post($url, $params);
$tw->delete($url, $params);
```

Resources
---------

[](#resources)

To run unit tests, you need to use the following command:

```
$ cd path/to/Webiny/Component/TwitterOAuth/
$ composer.phar install
$ phpunit

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~5 days

Total

22

Last Release

3153d ago

PHP version history (3 changes)1.0.x-devPHP &gt;=5.4.0

v1.2.0PHP &gt;=5.5.9

1.5.x-devPHP ^7

### Community

Maintainers

![](https://www.gravatar.com/avatar/4440afa738ed146b05c06073a90345e0464c4f4d042b039532d881ca24859d77?d=identicon)[SvenAlHamad](/maintainers/SvenAlHamad)

---

Top Contributors

[![SvenAlHamad](https://avatars.githubusercontent.com/u/3808420?v=4)](https://github.com/SvenAlHamad "SvenAlHamad (24 commits)")

---

Tags

oauthtwitter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/webiny-twitter-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/webiny-twitter-oauth/health.svg)](https://phpackages.com/packages/webiny-twitter-oauth)
```

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[hybridauth/hybridauth

PHP Social Authentication Library

3.4k8.5M94](/packages/hybridauth-hybridauth)[league/oauth1-client

OAuth 1.0 Client Library

99898.8M106](/packages/league-oauth1-client)[opauth/opauth

Multi-provider authentication framework for PHP

1.6k783.4k58](/packages/opauth-opauth)[themattharris/tmhoauth

An OAuth library written in PHP by @themattharris

8512.3M32](/packages/themattharris-tmhoauth)[socialconnect/auth

Social Connect Auth Component

568845.4k5](/packages/socialconnect-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
