2015-09-06 60 views
1

当试图获得一个请求令牌的应用程序,它会取得错误:雅虎的OAuth2错误95022

Oops. Yahoo is unable to process your request. We recommend that you contact the owner of the application or web site to resolve this issue. [95022] Close

这是提高错误代码:

var main = angular.module("main", ["ngRoute"]); 

main.config(function ($routeProvider) { 
    $routeProvider 
    .when('/', { 
     templateUrl: 'partials/login.html', 
     controller: 'loginController' 
    }) 
}); 

main.controller("loginController", function ($scope) { 
    $scope.login = function() { 
     var clientID = "[redacted]"; 
     window.location.href = "https://api.login.yahoo.com/oauth2/request_auth?client_id=" + clientID + "&redirect_uri=http://www.acleanpairofshorts.com&response_type=token&language=en-us"; 
    }; 
}); 
+1

可能是[this]的副本(http://stackoverflow.com/questions/27933059/unable-to-get-yahoo-oauth-2-authorization)? – lrnzcig

回答

0

您需要URL-对redirect_uri参数的值进行编码,否则后面的参数将被解释为该参数的一部分而不是实际的URL。