If you are trying to make unauthenticated calls  don't bother running them
through OAuth. Just call them directly using curl.

Abraham

On Thu, Jul 16, 2009 at 07:39, BarefootSanders <mgold...@gmail.com> wrote:

>
> 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.
> http://twitter.com/users/show.xml?screen_name=dougw
>
> 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
> ['oauth_token_secret'];
>    }
>
> And want to do this:
> $to = new TwitterOAuth();
> $result = $to->OAuthRequest($url);
>
> print_r($result);
>
> But it's not working and I cant figure out what function is being
> called.
>
> Hope I didn't ramble to long.. Any help would be much appreciated.
>



-- 
Abraham Williams | Community Evangelist | http://web608.org
Hacker | http://abrah.am | http://twitter.com/abraham
Project | http://fireeagle.labs.poseurtech.com
This email is: [ ] blogable [x] ask first [ ] private.

Reply via email to