所以我使用的是来自 Twitter 的 TwitterKIT,而不是 Fabric,我遇到了一个错误。这是代码。我还按照 Twitter 上准确记录的 TwitterKIT 安装
[TwitterKit] 无法从 TWTRTimelineViewController 加载推文:错误域 = TwitterAPIErrorDomain 代码 = 99 “请求失败:禁止 (403)” UserInfo = {NSLocalizedFailureReason = Twitter API 错误:无法验证您的凭据(代码 99),TWTRNetworkingStatusCode = 403, NSErrorFailingURLKey= https://api.twitter.com/oauth2/token , NSLocalizedDescription=请求失败:禁止 (403)}
class TimeView: TWTRTimelineViewController{
@IBOutlet var Menu: UIBarButtonItem!
override func viewDidLoad() {
self.view.addGestureRecognizer(self.revealViewController().panGestureRecognizer())
Menu.target = self.revealViewController()
Menu.action = #selector(SWRevealViewController.revealToggle(_:))
let client = TWTRAPIClient.withCurrentUser()
self.dataSource = TWTRUserTimelineDataSource(screenName: "PortCreditSS", apiClient:client)
self.showTweetActions = true
}
}