Skip to content

NinoSkopac/php7-oauth1-signature-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Request Token Example

$requestURL = 'TOKEN REQUEST ENDPOINT';

$OAuth = new OAuth1_Utils;

$OAuth
->setConsumerKey('CONSUMER KEY')
->setCallback('REDIRECT URL')
->setSignature($OAuth->createSignature(
    $requestURL,
    'CONSUMER SECRET',
    null, // token secret doesn't exist yet as this is request token stage
    'POST'
));

// make a request with CURL using constructed OAuth1 payload
$curl = curl_init($requestURL . '?' . http_build_query($OAuth->getPayload()));

// or if you only need the OAuth1 signature:
$signature = $OAuth->getSignature();

For more examples, go to the /examples folder.

About

OAuth1 signature generator for PHP7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages