Download the PHP package coderjerk/elephant-bird without Composer

On this page you can find all versions of the php package coderjerk/elephant-bird. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elephant-bird

Bird Elephant

Latest Packagist Version Total Downloads

Minimum PHP Version twitter

Connect to Twitter API v2 endpoints in PHP.

This package provides a number of useful ways to interact with the Twitter Rest API v2 endpoints in PHP. It provides a clean and easy to understand set of methods and classes to send tweets, manage users, lookup data, and everything else that the Twitter API v2 provides, from within your app or site.

Full documentation and examples on birdelephant.com

Getting Started

To use the Twitter API v2, and consequently this package, you must have an approved developer account and have activated the new developer portal.

Learn more about getting access to the Twitter API v2 endpoints:

Twitter Api Getting Started Docs

Install

Install via composer.

Authentication

You will need to generate your credentials when creating your App in Developer Portal.

Follow the Twitter developer documentation above on how to do this. Make sure to grant your app the correct permissions, and enable 3 legged OAuth if you need it.

Pass the credentials as a key value array as follows:

Twitter Developer Authentication docs

OAuth 2.0 Bearer token auth is the most straightforward, but will limit you to certain endpoints.

Of course, in both possible user context auth flows, you will need to pass the authenticated user's credentials as token_identifier and token_secret for OAuth 1.0a or 'auth_token' for OAuth 2.0.

OAuth 1.0a is supported, but it would be wise for new apps to prefer OAuth 2.0 with PKCE as certain newer endpoints only support this form of authentication, and it is posible that Twitter might drop support for it in the future.

OAuth 1.0a is needed to perform media uploads - the only Api v1.1 endpoint supported by BirdElephant as a v2 replacement doesn't exist yet.

You can look at smolblog/oauth2-twitter, which does the job well.

Remember to include the necessary scopes when using OAuth 2.0 with PKCE - full list here:

https://developer.twitter.com/en/docs/authentication/oauth-2-0/authorization-code

Protect your credentials carefully and never commit them to your repository. I'd recommend using a .env file to manage your credentials, you can copy the contents of .env.example to .env in your project and populate with your own credentials if you wish: how to use it here

Documentation

Documentation and examples for all available Bird Elephant methods can be found here.

Quick Examples

The package provides a number of different ways of interacting with the Twitter API. The recommended way is by using the simple helper methods, but a utility method is available and direct access to many of the underlying classes is also possible. If you wish to interact with the underlying classes, read the documentation in the code.

Reference

Notes

This is an unofficial tool written by me in my spare time and is not affiliated with Twitter.

This package does not support Twitter API v1.1 (with the exception of media uploads).

Sponsored By

Thanks to Hype Machine for sponsoring the project.

Sponsor

If you or your company find this library useful show your love by throwing me a few euros and I'll give you a shout out on here and on the project website

Sponsor Development

Contributing

Fork/download the code and run

composer install

copy .env.example to .env and add your credentials for testing.

To run tests

./vendor/bin/phpunit

Issues, pull requests and other contributions most welcome. Please use the issue template provided.

You can look at the project board for upcoming features if you want to pitch in :)

Where we go from here - the future of the project in light of changes to the API


All versions of elephant-bird with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.0
vlucas/phpdotenv Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coderjerk/elephant-bird contains the following files

Loading the files please wait ....