Created
May 7, 2010 02:31
-
-
Save erikeldridge/392962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once("../yosdk/yahoo-yos-social-php5-86eef28/lib/OAuth/OAuth.php"); | |
$consumer = new OAuthConsumer($_GET['cKeyInputField'], $_GET['cSecretInputField']); | |
$api_endpoint = 'http://test.erikeldridge.com/hak/cck.php'; | |
$params = array('pAppid' => $_REQUEST['pAppid']); | |
$params = array('name' => $_REQUEST['name']); | |
$params = array('description' => $_REQUEST['description']); | |
$params = array('appid' => $_REQUEST['appid']); | |
$params = array('return_to' => $_REQUEST['return_to']); | |
$params = array('third_party' => $_REQUEST['third_party']); | |
$params = array('scopes' => $_REQUEST['scopes']); | |
$params = array('favicon' => $_REQUEST['favicon']); | |
$params = array('application_url' => $_REQUEST['application_url']); | |
$params = array('domain' => $_REQUEST['domain']); | |
$req = OAuthRequest::from_consumer_and_token( $consumer, null, "POST", $api_endpoint, $params ); | |
$sig_method = new OAuthSignatureMethod_HMAC_SHA1(); | |
$req->sign_request( $sig_method, $consumer, null ); | |
header('Content-Type: application/json'); | |
echo json_encode($req->parameters); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment