Download the PHP package mpyw/twistoauth without Composer

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

TwistOAuth

Warning: This package is abandoned and no longer maintained. Use mpyw/cowitter package instead.

Advanced PHP Twitter library.
Version 3.5.2

Requirements

Features

Basic:

Abusing:

Preparation

1. Download this library

You can choose one of the following methods.

Direct Download

Click here to save TwistOAuth.phar in your working directory.

Composer

Modify require directive in composer.json.

If you choose this, replace all

into

in examples.

2. Register your application

You can manage your API keys in https://apps.twitter.com. Now, let's register your own application.

  1. Click Create New App
  2. Fill Name Description WebSite.
  3. Fill Callback URL. By default, users are redirected here after successfully authenticating.
  4. Read rules and check Yes, I agree.
  5. Click Create your Twitter application.

NOTE: localhost is not available for Callback URL. Use 127.0.0.1 instead.

3. Change application permissions

By default, you can only read tweets but cannot post tweets. You have to configure permission settings.

  1. Open detail page of your application.
  2. Click Permissions Tab.
  3. Select Read, Write and Access direct messages.
  4. Click Update settings.

4. Note your consumer_key and consumer_secret

These parameters are identifier for your application.

  1. Open detail page of your application.
  2. Click API Keys Tab.
  3. Note API key and API secret. They mean consumer_key and consumer_secret.

5. Generate your access_token and access_token_secret

These parameters are identifier for your account.

  1. Open detail page of your application.
  2. Click API Keys Tab.
  3. Click Generate my access token.
  4. Note Access token and Access token secret.

Contents

FAQ

How can I learn about Twitter API?

Learn from documentation.

Or watch actual response. The following tool is very very useful.

Aren't there any nice authentication tools for obtaining tokens?

Try the following commandline utility.

How do I use OAuth 2.0 authentication flow?

Sorry, it is not available with this library. Use OAuth 1.0a instead.

What is oauth_verifier ?

It is required for calling the following methods.

You can get it after user redirecting.

What is oauth_callback ?

It is not required, but you can apply it for calling the following methods.

There are three value types.

Name Example Value Authentication Type
Empty String "" PIN or URL (Use default setting)
URL "http://example.com/callback.php" URL
Out-Of-Band "oob" PIN

WARNING:
You can only use URL if your application is configured as Browser Application.
This means Callback URL is not empty.

How do I use $to in callback closure?

Use use().

How do I ignore TwistException thrown?

Now your code is:

To ignore all responses...

Are all classes immutable?

Yes.

However, you can change propety values by directly calling __construct().

Why don't you use namespace?

This is because of the compatibility with previous versions of abraham/twitteroauth.
I believe that the prefix Twist- will never collide with any other libraries.

Tweets are already escaped... wtf!?

HTML special chars in texts of statuses are already escaped by Twitter like this.

WARNING:
The flag is ENT_NOQUOTES, not ENT_QUOTES or ENT_COMPAT.
The following snippet may print broken HTML.

You should do like this. Do not forget to set 4th parameter into false.

User description contains unescaped &... wtf!?

HTML special chars in others are already sanitized by Twitter like this.

WARNING:
& is not replaced into &.
The following snippet may print broken HTML.

You should do like this.

cURL causes SSL certificate problem error in Windows!

In the past library, this problem was done with the following solution.

However, it makes vulnerability for man-in-the-middle attack. Your connection can be hijacked even if using the protocol https://. This attack can be committed in the following case.

The right way is to download to add CA information to your computer.

1. Download ca-bundle.crt to save in the directory, which path should not contain multibyte characters.

2. Add the following definition in php.ini.

3. Restart Apache.


All versions of twistoauth with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
ext-hash Version *
ext-json Version *
ext-reflection Version *
lib-openssl Version *
lib-curl Version *
lib-libxml Version *
lib-pcre Version *
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 mpyw/twistoauth contains the following files

Loading the files please wait ....