Reputation: 4405
I'm trying to do something very basic, I want to call the Twitter API from the iPhone app in order to receive public data such as public timeline of some user.
I read for 2 hours the Twitter Developer Doc and still don't understand how should I implement this...
I don't want my users to connect or authenticate via Twitter. I read about the option to use "Application-only authentication" - I have opened an application under my account and have an API key and secret.
Please give me an example on how to use the Twitter API within the iPhone app.
P.S. where can I see what API calls are available via "Application-only authentication" ?
Upvotes: 1
Views: 845
Reputation: 3882
Using a bearer token with the app-only authentication is the right thing to do.
You will find an example with the STTwitter library in the following answer: Twitter OAuth and accessToken to GET statuses/user_timeline in Objective-C
To know which calls are available with app-only authentication, check "Resource Information > Authentication" on the right of each API resource documentation https://dev.twitter.com/docs/api/1.1
Generally speaking, all endpoints that don't require a user context (like posting, retweet, mark as favorite, ...) are available with app-only auth https://dev.twitter.com/docs/auth/application-only-auth
Upvotes: 6