After a user has authenticated via oauth, the following does not work:

<?
include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';
include 'secret.php';
include 'connect.php';

$twitterObj2 = new EpiTwitter($consumer_key, $consumer_secret,
$oauth_token, $oauth_token_secret);
$tweet = "testing";
$twitterObj2->post_statusesUpdate(array('status' => $tweet));

?>

but the following does work even though the additional code should not
make a difference to the twitter api

<?
include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';
include 'secret.php';
include 'connect.php';

$twitterObj2 = new EpiTwitter($consumer_key, $consumer_secret,
$oauth_token, $oauth_token_secret);

$twitterInfo= $twitterObj1->get_statusesUser_timeline(array
('screen_name' => $username));


foreach($twitterInfo as $status) {

       $url="http://www.ebay.com";;
       $url = rawurlencode($url);

       //USE IS.GD API
       $url = "http://is.gd/api.php?longurl=".$url;
       $fh = fopen($url,'r');
       $isgdurl = fread($fh, 140);
       fclose($fh);


      $tweet = "testing";
      $twitterObj2->post_statusesUpdate(array('status' => $tweet));

}

?>

Reply via email to