Download the PHP package ejunker/twitter without Composer

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

Twitter for PHP

Build Status StyleCI Latest Version on Packagist 3.x Downloads 2.x Downloads GitHub Release Date

Twitter API for Laravel 6.x, 7.x, 8.x (and new versions as they are released). Also supports other frameworks via PHP-DI (or feel free to add support for your framework via PR)

You need to create an application and create your access token in the Application Management.

Installation

Laravel Configuration

Just set the below environment variables in your .env.

Advanced Laravel configuration

Run php artisan vendor:publish --provider="Atymic\Twitter\ServiceProvider\LaravelServiceProvider"

Versions

3.x

3.x is the current major version, and is not backward compatible with 2.x.

See the migration guide in UPGRADE.md.

2.x

2.x is not longer maintained. We are not accepting bug fixes, please upgrade to 3.x

Usage

Output format

You can choose between three different output formats. By default responses will be returned as objects. To change this, use the format option in the parameters you pass to any method.

Twitter API Versions

To set the default twitter API version to v2 instead of the default v1.1, set the TWITTER_API_VERSION to 2 in your .env.

If you have set the v1.1 api as the default, you can use use Twitter::forApiV2() to get an instance of the v2 client. The same goes for getting a v1 instance from a v2 client, using Twitter::forApiV1().

It is safe to call Twitter::forApiV1() on either a v1 or v2 client instance.

Functions

Twitter API v1.1

Account

Block

DirectMessage

Favorite

Friendship

Geo

Help

List

Media

Search

Status

Trend

User

Twitter API v2

Tweet Lookup

Search Tweets

Timelines

Filtered Stream

Sampled Stream

Hide Replies

Helper Functions

Linkify : Transforms URLs, @usernames, hashtags into links. The type of $tweet can be object, array or text. By sending an object or an array the method will expand links (t.co) too.

Ago : Converts date into difference (2 hours ago)

LinkUser : Generates a link to a specific user, by their user object (such as $tweet->user), or id/string.

LinkTweet : Generates a link to a specific tweet.

Examples

Returns a collection of the most recent Tweets posted by the user indicated by the screen_name or user_id parameters.

Returns a collection of the most recent Tweets and retweets posted by the authenticating user and the users they follow.

Returns the X most recent mentions (tweets containing a users's @screen_name) for the authenticating user.

Updates the authenticating user's current status, also known as tweeting.

Updates the authenticating user's current status with media.

Get User Credentials with email.

In the above, you need to pass true as a string, not as a boolean. The boolean will get converted to 1 which Twitter ignores.

This also is assuming you have your permissions setup correctly with Twitter. You have to choose 'Get user email' when you set up your Twitter app, passing the value alone will not be enough.

Sign in with twitter

Twitter API v2 Examples

Get user tweets:

Search tweets:

Debug

First activate debug mode in the config file.

Then you can access the logs() method.


All versions of twitter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
illuminate/support Version 6 - 8
guzzlehttp/guzzle Version ^6.4 || ^7.0
psr/log Version ^1.1
nesbot/carbon Version ^1.2 || ^2.26
guzzlehttp/oauth-subscriber Version ^0.4
php-di/php-di Version ^6.2
kamermans/guzzle-oauth2-subscriber Version ^1.0
phpoption/phpoption Version ^1.7
vlucas/phpdotenv Version *
react/http Version ^1.2
league/oauth2-client Version ^2.6
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 ejunker/twitter contains the following files

Loading the files please wait ....