Reputation: 2958
i'm using Fabric and TwitterAPI for fetching tweets of a specific user my code:
class FetchTwitterTableViewController: TWTRTimelineViewController {
override func viewDidLoad() {
super.viewDidLoad()
print("FETCHING....")
let client = TWTRAPIClient()
self.dataSource = TWTRUserTimelineDataSource(screenName: "MyTwitterUsername", apiClient: client)
}}
the above is showing tweets of desired user in a custom ViewController,
here i wanna access these tweets individually by their ids, how can i do it?
Upvotes: 0
Views: 259
Reputation: 7013
You can do it with withJSONArray
method
class FetchTwitterTableViewController: TWTRTimelineViewController {
override func viewDidLoad() {
super.viewDidLoad()
print("FETCHING....")
self.dataSource = TWTRTweet.tweets(withJSONArray: yourIdArr as [AnyObject]) as [AnyObject])
}
}}
Upvotes: 1