Hi all.  I've been working on a twitter app using the new OAuth
protocol and the example code provided by twitter (This is the code:
http://github.com/abraham/twitteroauth).  I'm sure some of you have
seen/used it before.  I had a question and was hoping someone could
help me out.

What I'm noticing is that when a twitter object is created, i.e.

$to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION
['oauth_access_token'], $_SESSION['oauth_access_token_secret']);

The method OAuthRequest is called to actually perform the request from
the Twitter api.  However when I look in the TwitterOAuth class there
is no method named OAuthRequest.  There is a method named oAuthRequest
(notice the change in case and I thought PHP was case sensitive) and
I'm trying to figure out what function is actually being called.  It
seems like oAuthRequest is being called because the params match up
but idk.

What I'm trying to do with this is actually make an unauthenticated
request for api calls that dont need to be authenticated i.e.

So I changed the constructor to this.

if ($_SESSION['oauth_access_token'] === NULL && $_SESSION
['oauth_access_token_secret'] === NULL) {
      /* Create TwitterOAuth object with app key/secret and token key/
secret from default phase */
      $to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION
['oauth_request_token'], $_SESSION['oauth_request_token_secret']);
      /* Request access tokens from twitter */
      $tok = $to->getAccessToken();

      /* Save the access tokens. Normally these would be saved in a
database for future use. */
      $_SESSION['oauth_access_token'] = $tok['oauth_token'];
      $_SESSION['oauth_access_token_secret'] = $tok

And want to do this:
$to = new TwitterOAuth();
$result = $to->OAuthRequest($url);


But it's not working and I cant figure out what function is being

Hope I didn't ramble to long.. Any help would be much appreciated.

Reply via email to