Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.

Latest commit

 

History

History
30 lines (20 loc) · 582 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 582 Bytes

TwitterHook

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.",
));