ios - 带有 Yahoo API 的 OAuth2
<p><p>我想读写用户的<a href="https://developer.yahoo.com/fantasysports/guide/" rel="noreferrer noopener nofollow">Yahoo Fantasy Sports</a>数据。</p>
<p>我正在尝试通过 <a href="https://developer.yahoo.com/oauth2/guide/" rel="noreferrer noopener nofollow">Yahoo API</a> 访问使用 <a href="https://github.com/OAuthSwift/OAuthSwift" rel="noreferrer noopener nofollow">OAuthSwift</a> . </p>
<p>我的 OAuthSwift 对象如下所示:</p>
<pre><code>let oauth2Swift = OAuth2Swift(
consumerKey: "*****",
consumerSecret: "*****",
authorizeUrl: "https://api.login.yahoo.com/oauth2/request_auth",
accessTokenUrl: "https://api.login.yahoo.com/oauth2/get_token",
responseType: "code"
)
</code></pre>
<p>我是这样执行的:</p>
<pre><code> self.oauth2Swift.authorize(withCallbackURL: "com.me.myapp", scope: "fspt-w", state: "", success: { (cred, response, params) in
print("✅ success")
}) { (error) in
print("
页:
[1]