2015-09-06 74 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。