I have to show the content of some tweets of certain Twitter accounts, I show the TimeLine of the user who passed him without problems through Fabric and TwitterKit. The problem is that I have to store these tweets in a database, the text, the associated Urls and some more information, so I do not want to show them to me on the screen, I want to obtain that information.
With the following code I show the Twitter TimeLine on the screen:
func mostrarTimeLine() {
let client = TWTRAPIClient()
self.dataSource = TWTRUserTimeLineDataSource(screenName: "cuentaTwitter", apiClient: client)
}
I have tried to access dataSource methods to try to get the text but I have not solved anything.
I have also tried to download a JSON with all the information to then pause it, but I have tried functions of this type without result, I do not know how to define the connection string to authenticate with the user and do not return me that I am not Logged.
func obtener() {
let txtrRequest = Twitter.sharedInstance().APIClient.URLRquestWithMethod("GET", URL: "https://userstream.twitter.com/1.1/statuses/sample.json", parameters: nil, error: nil)
let urlConnection = NSURLConnection(request: txtrRequest, delegate: self)
urlConnection?.start()
}
I do not know how to do it, I have given a thousand laps to the functions offered but I do not give with the solution. I hope someone can help me.
I'm with an application developed on IOS with Swift.