Does TWRequest iOS API support application-only authentication?

If the iOS user does not have twitter accounts, is it possible to use authentication only for applications through TWRequest for apis, for example, to get the user's timeline? (User_timeline.json)?

I am currently getting an http status of 400 with the user_timeline.json API when there are no Twitter account settings on the iOS device.

+6
source share
2 answers

You cannot use TWRequest directly, since TWRequest requires an ACAccount instance. This acAccount is optional according to the documentation, and the Apple implementation can fully process the application stream when acAccount is zero, but unfortunately this is not the case.

However, you can use the STTwitter library to retrieve the user's timeline without the user's context.

Code snippet here .

+1
source

Have a look at this answer: iOS Twitter User Timeline using API v1.1

In any case, since iOS 5 and Twitter REST API v1.1, it was becoming more complicated to retrieve any information from the device without using an account.

My solution was to add a UIWebView (instead of a perfect UITableView). And then he designed the PHP website (table with tweets) to get timeline information from Twitter to my server.

0
source

Source: https://habr.com/ru/post/947258/


All Articles