PHP OAuth Proxy for systems without keyboard input.
-
Edit inc/config.inc.php.dist, and rename it to inc/config.inc.php.
-
(Optional, but Recommended!) Personalize finish.php.
-
A keyboardless application contacts start.php, and saves the id and key (passed on as a JSON dictionary).
-
The keyboardless application requests the user to contact userauth.php?id=[id], where [id] is the [id] supplied to the application on start.php.
-
As soon as user accesses the link and logs on to Twitter, finish.php will be called as part of the authentication process and the OAuth details stored on the database.
-
The keyboardless application should be pinging retrieve.php?id=[id]&key=[key] every second or so, depending on whatever is acceptable UX for you, where [id] and [key] are the [id] and [key] received on the start.php. This should be done until the server replies with a OAuth key/secret.
-
The keyboardless application may now use these details to log on to Twitter!
CREATE TABLE IF NOT EXISTS `flow` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`key` varchar(256) NOT NULL,
`oauth_token` varchar(128) NOT NULL,
`oauth_token_secret` varchar(128) NOT NULL,
`access_token` varchar(128) NOT NULL,
`access_token_secret` varchar(128) NOT NULL,
PRIMARY KEY (`id`));