I followed the developer documentation https://dev.twitter.com/twitter-kit/ios/show-timelines to display a timeline of tweets in my application. However after I log-in I just see an empty table view.
I had to add the following line to get the code to compile:
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
I’d be extremely appreciative of any pointers on what’s going wrong. Or if someone could point me to some simple sample code which uses Fabric to display a timeline of tweets that would be great.
I took a look at Cannonball iOS but they are using TWTRTweetViewDelegate technique instead of the TWTRTimelineViewController in the documentation.
My full class looks like this:
import UIKit
import TwitterKit
class SearchTimelineViewController: TWTRTimelineViewController {
convenience init() {
let client = Twitter.sharedInstance().APIClient
let dataSource = TWTRSearchTimelineDataSource(searchQuery: "#twitterflock", APIClient: client)
self.init(dataSource: dataSource)
}
override required init(dataSource: TWTRTimelineDataSource) {
super.init(dataSource: dataSource)
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
}
Happy to post my entire project online if it’s useful.
Thanks,
Pete