PHP Classes

File: How_to_use.php

Recommend this page to a friend!
  Classes of Shafiul Azam   Easy Twitter Authenticaion Class - OAuth & Session   How_to_use.php   Download  
File: How_to_use.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: Easy Twitter Authenticaion Class - OAuth & Session
Authenticate Twitter users using oAuth
Author: By
Last change: minor changes
Date: 13 years ago
Size: 477 bytes
 

Contents

Class file image Download
<?php

/*
First, get your Application's "conusmer key" & "consumer secret" from
http://dev.twitter.com
& put them in twitterWrapper.php
*/
   
session_start();

   
// authenticate twitter users

   
require_once 'twitterWrapper.php';
   
$myT = new twitterWrapper();
   
$myT->authenticate();

   
// security check done.
?>

To print the user's Twitter username, you can call:

<?php echo "Thanks for authenticating yourself, " . $myT->getIdentifier(); ?>