Skip to content
Simple PHP Wrapper for Twitter API v1.1 calls
PHP
Branch: master
Clone or download
Pull request Compare This branch is 1 commit ahead, 13 commits behind J7mbo:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE.md
README.md
TwitterAPI.php
index.php

README.md

twitter-api-php

Even more simple PHP Wrapper for sending tweets to twitter via API v1.1 calls

The aim of this class is simple. You need to:

You really can't get much simpler than that.

Installation

Just include TwitterAPI.php in your application.

How To Use

Include the class file

require_once('TwitterAPI.php');

Create a new object

$twitter = new TwitterAPI(
    "YOUR_OAUTH_ACCESS_TOKEN",
    "YOUR_OAUTH_ACCESS_TOKEN_SECRET",
    "YOUR_CONSUMER_KEY",
    "YOUR_CONSUMER_SECRET"
);

Send a tweet

$twitter->tweet("THIS IS YOUR TWEET");

Send a tweet with an image

$twitter->tweetImage('THIS IS A TWEET WITH AN IMAGE', 'path/to/image.jpg');

That is it! Really simple, works great with the 1.1 API.
Thanks to @lackovic10 and @rivers on SO and James Mallison for their awesome work!

You can’t perform that action at this time.