Hi Adam,

I would suggest taking a look at Abraham's Twitter oAuth library for a
great example of PHP + Twitter oAuth.
http://twitter.abrah.am/

-Chad

On Fri, Aug 14, 2009 at 5:25 PM, Adam Shannon<a...@ashannon.us> wrote:
> Hey,
> This is my first post and I'm new to Oauth, I must be doing something wrong
> and I'm looking for help.
> Here is just a sample uri generator i'm trying...
> <?php
>
> // Some defaults
> $consumer_key = ''; // Normally My Key
> $consumer_secret_key = ''; // Normally the private key.
> $signature_method = 'HMAC-SHA1';
>
> // Lets get it setup
> $request_uri = 'http://twitter.com/oauth/request_token';
> $oauth['parms']['oauth_consumer_key'] = '?oauth_consumer_key=' .
> $consumer_key;
> $oauth['parms']['oauth_signature_method'] = '&oauth_signature_method=' .
> $signature_method;
> $oauth['parms']['oauth_signature'] = '&oauth_signature=' .
> sha1($consumer_secret_key);
> $oauth['parms']['oauth_timestamp'] = '&oauth_timestamp=' . time();
> $oauth['parms']['oauth_nonce'] = '&oauth_nonce=' . (int) ceil( time() / (
> rand(200, 5000) / 2 ) );
> $oauth['parms']['oauth_version'] = '&oauth_version=1.0';
> foreach ($oauth['parms'] as $parm) {
> $request_uri = $request_uri . $parm;
> }
>
> echo $request_uri;
> I read that the nonce has to be unique and I believe that it is, the
> signature I have no clue (am I supposed to use a known substring of a
> mycrypt?  Or am I supposed to hash the data and let you compare it?
> I'm really struggling with this, if I could get any help it would be great.
> --
> - Adam Shannon ( http://ashannon.us )
>

Reply via email to