I installed the Twitter SDK into the project via Fabric.app. I can log in to my Twitter account, but when I do something related to requesting tweets, I threw these print instructions:
print("Failed to load tweets: \(error!.localizedDescription)") print(error?.localizedFailureReason)
and get this error:
Failed to load tweets: Request failed: forbidden (403) Optional("Twitter API error : Unable to verify your credentials (code 99)")
but when I add this line to viewDidLoad on my TVC , I return the value:
print("Twitter.sharedInstance().sessionStore.session()?.userID is \(Twitter.sharedInstance().sessionStore.session()?.userID)")
There is a Fabric entry in my Info.plist . I did not modify or manipulate it when installing Fabric.app .
In my AppDelegate.swift didFinishLoadingWithOptions :
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // I tried using the consumerKey/consumerSecret for Fabric & Twitter for S & G to no avail Twitter.sharedInstance().startWithConsumerKey("myConsumerKey", consumerSecret: "myConsumerSecret") Fabric.with([Twitter.self()]) return true }
I ran the Fabric Twitter Settings Checklist, which was configured, and I did everything, but I obviously did something. Sample code from the Fabric website does not work out of the box for me. Any thoughts: where to look for a problem? I have no ideas.
ios swift twitter twitter-fabric fabric-twitter
Adrian
source share