Skip to content

Instantly share code, notes, and snippets.

@idancali
idancali / stackmob-php-oauth2.php
Created December 7, 2012 02:02
StackMob PHP OAuth2 Client
function oauth_hmacsha1($key, $data) {
return base64_encode(hash_hmac('sha1', $data, $key, true));
}
function generateHeader()
{
$params = array ();
$method = "GET";
$uriAndQuery = "user";