Get data from TWTRDataSource?

ios
fabric
swift
twitterkit

#1

Hello!

Is there a way to retrieve data from a TWTRDataSource? I would like to be able to access the tweets that are inside of it, but don’t know what methods I can call on it.

Many thanks,
Mike


#2

I found this post from about a year ago, which seems to be getting at the same question. Unfortunately, they did not get an answer:

There seems to be an instance method “loadPreviousTweetsBeforePosition:completion:” whose completion block could be used to get the individual tweets from a timeline data source. Here’s the code from TWTRTimelineDataSource.h:
`
/**

  • Load Tweets before a given position. For time-based timelines this generally
  • corresponds to Tweets older than a position.
  • @param position (optional) The position or Tweet ID before the page
  •                  of Tweets to be loaded.
    
  • @param completion (required) Invoked with the Tweets and the cursor in case of success, or nil
  •                  and an error in case of error. This must be called on the main thread.
    

*/

  • (void)loadPreviousTweetsBeforePosition:(nullable NSString *)position completion:(TWTRLoadTimelineCompletion)completion;
    `
    Yet, this method is not unable to call it from TWTRDataSource instances (e.g. TWTRUserTimelineDataSource). TWTRTimelineDataSource is a protocol, not a class, but you should be able to call an instance method on any conforming class, so again, I’m confounded.

Any clues would be appreciated. How can you access the tweets inside of a TWTRTimelineDataSource?

Many thanks,
Mike


#3

Still haven’t gotten an answer about this. Does anyone know the answer? How do we access the TWTRTweets in the TWTRDataSource or TWTRTimeline?

Thanks,
Mike