hello to all.
I have an application that I wrote in php5 which pulls information from a website that a user is registered to and displays his/her information from that site in the application.
Now i need the application to be able to get information about the user (i.e. his friends (so that the user can invite his freinds to use the app) and other information as well).
I am trying to authorize my application using the OAUTH and I am following the step by step instructions found here. http://wiki.developer.myspace.com/index.php?title=OAuth_REST_API_Usage_-_Authentication_Process
I am using the official myspace php api library: myspace-da-php-download.
Now every time i try to authorize the user right after "step 2:redirect to a myspace url to authenticate the user." I should be getting back a new parameter called oauth_token.
However my query string always mentions that i have an error and that: External Domain o oauth_callback uri is not set.
This is the full query string that I get back:
oauth_problem=oauth_problem%253Dparameter_rejected%252C%2520oauth_parameters_rejected%253DExternal%252520Domain%26oauth_problem_advice%253D%255BExternal%2520Domain%255D%2520or%2520%255Boauth_callback%255D%2520uri%2520is%2520not%2520set.
Here is my php code:
$myspace = new MySpaceAPI($consumer_key,$consumer_secret);
$requestToken = $myspace->OAuthToken->get_request_token();
$tokens = array();
$requestTokenArray = explode('&',$requestToken);
for($i = 0; $i < count($requestTokenArray); $i++){
$tokens[$i] = explode('=',$requestTokenArray[$i]);
}
$oauth_token = $tokens[0][1];
$oauth_token_secret = $tokens[1][1];
$url=$myspace->OAuthToken->get_authorization_url("http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=133049", $oauth_token);
header ("Location: " . $url);
any help would greatly appreciated.
thank you in advance!