<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          OAuthSwift基于 Swift 的 OAuth 的 iOS 庫

          聯(lián)合創(chuàng)作 · 2023-09-23 21:41

          OAuthSwift 是基于 Swift 的 OAuth 的 iOS 庫,支持 OAuth 1 和 OAuth 2。

          示例

          // OAuth1.0
          let oauthswift = OAuth1Swift(
              consumerKey:    "********",
              consumerSecret: "********",
              requestTokenUrl: "https://api.twitter.com/oauth/request_token",
              authorizeUrl:    "https://api.twitter.com/oauth/authorize",
              accessTokenUrl:  "https://api.twitter.com/oauth/access_token"
          )
          oauthswift.authorizeWithCallbackURL( NSURL(string: "oauth-swift://oauth-callback/twitter"), success: {
              credential, response in
              println(credential.oauth_token)
              println(credential.oauth_token_secret)
          }, failure: failureHandler)
          
          // OAuth2.0
          let oauthswift = OAuth2Swift(
              consumerKey:    "********",
              consumerSecret: "********",
              authorizeUrl:   "https://api.instagram.com/oauth/authorize",
              responseType:   "token"
          )
          oauthswift.authorizeWithCallbackURL( NSURL(string: "oauth-swift://oauth-callback/instagram"), scope: "likes+comments", state:"INSTAGRAM", success: {
              credential, response in
              println(credential.oauth_token)
          }, failure: failureHandler)

          Setting Swift Compiler

          Setting URL Schemes

          Images

          瀏覽 15
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  青娱乐在线观看人人 | 91视频网站 | 97久久超碰福利国产精品 | 狠狠色噜噜狠狠狠7777豆 | 午夜三级福利无码 |