johnshopkins/twitterhook

This package is abandoned and no longer maintained. No replacement package was suggested.

A PHP library to interact with the GET and POST methods of the Twitter API using single user sign-on OAuth authentication. Adapted from @abraham's twitteroauth.

v2.0 2017-11-29 15:49 UTC

This package is auto-updated.

Last update: 2023-02-14 14:33:55 UTC


README

A PHP library to interact with the Twitter's REST API using single user sign-on OAuth authentication.

Example

<?php

include "path/to/vendor/autoload.php";

$consumer = array(
	"key" =>"consumerkey",
	"secret" => "consumersecret"
);

$token = array(
	"key" =>"accesstoken",
	"secret" => "accesstokensecret"
);

$twitterHook = new \TwitterHook\Client($consumer, $token);

$content = $twitterHook->get("statuses/home_timeline");

$tweet = $twitterHook->post("statuses/update", array(
  "status" => "You would not believe how I posted this tweet.",
));