【메모】TwitterKit을 사용하여 로그인 처리하기
Podinstall
pod init
↓
Podfile로pod 'TwitterKit'
↓pod install
API 키 가져오기
체계 추가
info.plist 파일을 SourcezCode에서 열고 다음을 나열하십시오.

ConsumerKey를 기재하는 것을 잊지 않고
info.plist<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-ここにConsumerKeyを記載</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>twitterauth</string>
</array>
디스플레이를 PropertyList로 되돌릴 때 URLtypes → item0 → URLSchemes → item0에 변경 사항이 반영되는지 확인

ApiKey 설명
AppDelegate.Swift func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
if TWTRTwitter.sharedInstance().application(app, open: url, options: options) {
return true
}
// Your other open URL handlers follow […]
return false
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
TWTRTwitter.sharedInstance().start(withConsumerKey: "ここにConsumerKeyを記載", consumerSecret: "ここにConsumerSecretを記載")
return true
}
로그인 처리 실행
(로그인 처리를 실행하고 싶습니다) ViewController.Swift
TWTRTwitter.sharedInstance().logIn(completion: { (session, error) in
if let sess = session {
print("signed in as \(sess.userName)");
print(self.username)
} else {
print("error: \(error?.localizedDescription)");
}
})
와우! ! !

@Satopppy_
Reference
이 문제에 관하여(【메모】TwitterKit을 사용하여 로그인 처리하기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Satopppy/items/70bb96571e0330b028e2
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
체계 추가
info.plist 파일을 SourcezCode에서 열고 다음을 나열하십시오.

ConsumerKey를 기재하는 것을 잊지 않고
info.plist<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-ここにConsumerKeyを記載</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>twitterauth</string>
</array>
디스플레이를 PropertyList로 되돌릴 때 URLtypes → item0 → URLSchemes → item0에 변경 사항이 반영되는지 확인

ApiKey 설명
AppDelegate.Swift func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
if TWTRTwitter.sharedInstance().application(app, open: url, options: options) {
return true
}
// Your other open URL handlers follow […]
return false
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
TWTRTwitter.sharedInstance().start(withConsumerKey: "ここにConsumerKeyを記載", consumerSecret: "ここにConsumerSecretを記載")
return true
}
로그인 처리 실행
(로그인 처리를 실행하고 싶습니다) ViewController.Swift
TWTRTwitter.sharedInstance().logIn(completion: { (session, error) in
if let sess = session {
print("signed in as \(sess.userName)");
print(self.username)
} else {
print("error: \(error?.localizedDescription)");
}
})
와우! ! !

@Satopppy_
Reference
이 문제에 관하여(【메모】TwitterKit을 사용하여 로그인 처리하기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Satopppy/items/70bb96571e0330b028e2
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-ここにConsumerKeyを記載</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>twitterauth</string>
</array>
AppDelegate.Swift
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
if TWTRTwitter.sharedInstance().application(app, open: url, options: options) {
return true
}
// Your other open URL handlers follow […]
return false
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
TWTRTwitter.sharedInstance().start(withConsumerKey: "ここにConsumerKeyを記載", consumerSecret: "ここにConsumerSecretを記載")
return true
}
로그인 처리 실행
(로그인 처리를 실행하고 싶습니다) ViewController.Swift
TWTRTwitter.sharedInstance().logIn(completion: { (session, error) in
if let sess = session {
print("signed in as \(sess.userName)");
print(self.username)
} else {
print("error: \(error?.localizedDescription)");
}
})
와우! ! !

@Satopppy_
Reference
이 문제에 관하여(【메모】TwitterKit을 사용하여 로그인 처리하기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/Satopppy/items/70bb96571e0330b028e2
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
TWTRTwitter.sharedInstance().logIn(completion: { (session, error) in
if let sess = session {
print("signed in as \(sess.userName)");
print(self.username)
} else {
print("error: \(error?.localizedDescription)");
}
})

@Satopppy_
Reference
이 문제에 관하여(【메모】TwitterKit을 사용하여 로그인 처리하기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/Satopppy/items/70bb96571e0330b028e2텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)