<commit_before>[Twitter for PHP](https://phpfashion.com/twitter-for-php)  [![Buy me a coffee](https://files.nette.org/images/coffee1s.png)](https://nette.org/make-donation?to=twitter-php)
================================

[![Downloads this Month](https://img.shields.io/packagist/dm/dg/twitter-php.svg)](https://packagist.org/packages/dg/twitter-php)

Twitter for PHP is a very small and easy-to-use library for sending
messages to Twitter and receiving status updates.

If you like this, **[please make a donation now](https://nette.org/make-donation?to=twitter-php)**. Thank you!

It requires PHP 5.4 or newer with CURL extension and is licensed under the New BSD License.
You can obtain the latest version from our [GitHub repository](https://github.com/dg/twitter-php)
or install it via Composer:

	composer require dg/twitter-php


Usage
-----
Sign in to the https://twitter.com and register an application from the https://apps.twitter.com page. Remember
to never reveal your consumer secrets. Click on My Access Token link from the sidebar and retrieve your own access
token. Now you have consumer key, consumer secret, access token and access token secret.

Create object using application and request/access keys

```php
use DG\Twitter\Twitter;

$twitter = new Twitter($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
```

The send() method updates your status. The message must be encoded in UTF-8:

```php
$twitter->send('I am fine today.');
```

The load() method returns the 20 most recent status updates
posted by you:

```php
$statuses = $twitter->load(Twitter::ME);
```<commit_msg>readme: added support me<commit_after>[Twitter for PHP](https://phpfashion.com/twitter-for-php)  [![Buy me a coffee](https://files.nette.org/images/coffee1s.png)](https://nette.org/make-donation?to=twitter-php)
================================

[![Downloads this Month](https://img.shields.io/packagist/dm/dg/twitter-php.svg)](https://packagist.org/packages/dg/twitter-php)

Twitter for PHP is a very small and easy-to-use library for sending
messages to Twitter and receiving status updates.

It requires PHP 5.4 or newer with CURL extension and is licensed under the New BSD License.
You can obtain the latest version from our [GitHub repository](https://github.com/dg/twitter-php)
or install it via Composer:

	composer require dg/twitter-php


[Support Me](https://github.com/sponsors/dg)
--------------------------------------------

Do you like Nette DI? Are you looking forward to the new features?

[![Buy me a coffee](https://files.nette.org/icons/donation-3.svg)](https://github.com/sponsors/dg)

Thank you!


Usage
-----
Sign in to the https://twitter.com and register an application from the https://apps.twitter.com page. Remember
to never reveal your consumer secrets. Click on My Access Token link from the sidebar and retrieve your own access
token. Now you have consumer key, consumer secret, access token and access token secret.

Create object using application and request/access keys

```php
use DG\Twitter\Twitter;

$twitter = new Twitter($consumerKey, $consumerSecret, $accessToken, $accessTokenSecret);
```

The send() method updates your status. The message must be encoded in UTF-8:

```php
$twitter->send('I am fine today.');
```

The load() method returns the 20 most recent status updates
posted by you:

```php
$statuses = $twitter->load(Twitter::ME);
```
{'fraction_non_alphanumeric': 0.1476904972050603, 'fraction_numerical': 0.0038246543100912034, 'mean_word_length': 4.431309904153355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6086586', 'n_tokens_mistral': 1020, 'n_tokens_neox': 941, 'n_words': 361}