मैं अपने जीमेल खाते से ईमेल पढ़ने के लिए oAuth2.0 का उपयोग कर रहा हूं। और यहाँ मेरे कोडकृपया कोड कॉपी करें, एप्लिकेशन पर स्विच करें और इसे पेस्ट करें लेकिन कहां?
oauthswift = OAuth2Swift(
consumerKey: "242468529977-xxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com",
consumerSecret: "GfGVl_xxxxxxxxxxmjnAX",
authorizeUrl: "https://accounts.google.com/o/oauth2/auth",
accessTokenUrl: "https://accounts.google.com/o/oauth2/token",
responseType: "code"
)
oauthswift?.allowMissingStateCheck = true
let _ = oauthswift?.authorize(
withCallbackURL: URL(string: "urn:ietf:wg:oauth:2.0:oob")!, scope: "https://www.googleapis.com/auth/gmail.metadata", state: "",
success: { credential, response, parameters in
let parameters = Dictionary<String, AnyObject>()
// Multi-part upload
print(credential)
print(response)
},
failure: { error in
print("ERROR: \(error.localizedDescription)")
}
)
है, लेकिन बाद मैं अनुमति देने यह मुझे इस स्क्रीन
दिखा और कहते है 'इस कोड को कॉपी और आवेदन करने के लिए स्विच और उसे वहां चिपकाएं करें।' लेकिन मुझे नहीं पता कि कोड पेस्ट करना है।
Jecky consumerSecret होना चाहिए: "", कृपया अपनी कुंजी मान को हटाने और इसलिए मेरे लिए वह अपने काम की कोशिश –