0

I'm trying to get the user timeline using TwitterKit with fabric framework, when I run the following code I get this output rather than a timeline

output  <TWTRUserTimelineDataSource: 0x7ff8b9447950>
  let client = TWTRAPIClient()
        let dataSource = TWTRUserTimelineDataSource(screenName: "fabric", APIClient: client)
        print(dataSource)
Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Afnan Humdan
  • 195
  • 3
  • 12

1 Answers1

0

Try this it might helps you

    import UIKit
    import TwitterKit

    class ViewController: TWTRTimelineViewController {

        convenience init() {
            let client = Twitter.sharedInstance().APIClient
            let dataSource = TWTRUserTimelineDataSource(screenName: "fabric", APIClient: client)

            self.init(dataSource: dataSource)
        }

        override required init(dataSource: TWTRTimelineDataSource) {
            super.init(dataSource: dataSource)
        }

        required init(coder aDecoder: NSCoder) {
            fatalError("init(coder:) has not been implemented")
        }
    }
Sourabh Sharma
  • 8,222
  • 5
  • 68
  • 78