views:

20

answers:

1

A curl HEADER should contain the following:

oauth_consumer_key="YOUR KEY HERE",     
oauth_signature_method="HMAC-SHA1", 
oauth_token="YOUR TOKEN HERE",         
oauth_timestamp="TIMESTAMP", 
oauth_nonce="OAUTH NONCE", 
oauth_version="1.0", 
oauth_signature="SIGNATURE"

where can i get the consumer_key, a valid oauth_token, timestamp, nonce, signature??

vic, thanx!

A: 

The specification to generate a proper OAuth request is here: http://tools.ietf.org/html/rfc5849

It is pretty complicated so I would recommend using an open source library to do the heavy lifting. You can find one here: http://oauth.net/code/

Where you get your consumer key depends on what API you are using. Twitter for example is http://dev.twitter.com/apps, and FourSquare is http://foursquare.com/oauth/.

abraham
thanx, i used a library (jaisenmathai-php)and get the right values, but twitter always say "could not authenticate you.." ;-)
vic

related questions