Download the PHP package laminas/laminas-twitter without Composer

On this page you can find all versions of the php package laminas/laminas-twitter. 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 laminas-twitter

laminas-twitter

Abandoned

This package is abandoned and will receive no further development!

See the Technical Steering Committee meeting minutes

🇷🇺 Русским гражданам

Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.

У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.

Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"

🇺🇸 To Citizens of Russia

We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.

One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.

You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"

Provides an object oriented PHP wrapper for the Twitter API.

Installation

Run the following to install this library:

Usage

Instantiate the Twitter class by providing your Twitter consumer key and secret, as well as the access token and secret:

Once you have done that, you may start making calls to the API. This can be done in one of three ways:

Available methods

Proxy Properties

The following proxy properties are allowed:

In each case, you can identify available methods for the proxy by comparing the proxy name to the above list of methods. As an example, the users proxy allows the following:

Direct access

The Twitter API has dozens of endpoints, some more popular and/or useful than others. As such, we are only providing a subset of what is available.

However, we allow you to access any endpoint via either the get() or post() methods, which have the following signatures:

In each case, the $path is the API endpoint as detailed in the Twitter API documentation, minus any .json suffix, and the method name corresponds to whether the request happens via HTTP GET or POST.

For HTTP GET requests, the $query argument provides any query string parameters you want to pass for that endpoint. As an example, if you were requesting statuses/home_timeline, you might pass count or since_id.

For HTTP POST requests, the $data argument can be one of:

The data to provide will vary based on the endpoint.

Media uploads

Since version 3.0, we have supported media uploads via the classes Laminas\Twitter\Media, Image, and Video. In each case, you will instantiate the appropriate class with the local filesystem path of the image to upload and the media type, followed by calling upload() with a properly configured HTTP client. The response will contain a media_id property, which you can then provide via the media_ids parameter when posting a status:

When providing media for direct messages, you must provide additional flags to the media class's constructor:

Unlike non-DM media uploads, the identifier will be in the id_str parameter of the returned upload instance; use that as a media_id in your DM:

Note: direct messages only support a single attachment.

Rate limiting

As of version 3.0, we now provide introspection of Twitter's rate limit headers, allowing you to act on them:


All versions of laminas-twitter with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0.0 || ~8.1.0 || ~8.2.0
ext-json Version *
laminas/laminas-feed Version ^2.7
laminas/laminas-http Version ^2.5.4
laminas/laminas-oauth Version ^2.0.3
laminas/laminas-stdlib Version ^3.0.1
laminas/laminas-uri Version ^2.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 laminas/laminas-twitter contains the following files

Loading the files please wait ....