Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter feed in an iOS app - how can i get a list feed just from my own account [without needing the app user to be signed into twitter]

I'm making an iOS App that needs to show tweets in a List feed that i have set up. The problem is that [i don't want to use the end user's twitter account at all], i just want to show that one list feed in the app, by pulling its data in through the Twitter API.

Unfortunately for me, the Twitter API after version 1.1, requires authentication to do anything with it.

https://dev.twitter.com/docs/api/1.1/get/lists/statuses#example-request

All of the cases i have seen are using the end user's login within iOS to pull feeds in, which works, but here is my issue:

Can I authenticate these requests for the list feed, without the end user who is using the app needing to be signed into their own twitter account on iOS. i.e. the requests are authenticated with one specific twitter account [mine]?

or if there is a way to get the raw feed data without using the twitter API [i need to raw data to place into a UITableView within my app - i don't want to use a UIWebView].

this would make the feed accessible to end users without a twitter account [the list feed is public anyway, so i don't know why it needs authentication in the first place].

Many thanks!

like image 244
james.ff Avatar asked Feb 19 '13 02:02

james.ff


People also ask

Why can't you view Twitter without an account?

Twitter lets you read anyone's tweets without needing an account; all you have to do is visit their profile page. Keep in mind that you can't see a profile if someone has made their account private, though. Without an account, you aren't able to request to follow them.

Can you make custom feeds on Twitter?

Twitter Lists allow you to customize, organize and prioritize the Tweets you see in your timeline. You can choose to join Lists created by others on Twitter, or from your own account you can choose to create Lists of other accounts by group, topic or interest.

How do you scroll on Twitter without an account?

Visit Twitter's Explore Page. The first simple workaround is to visit Twitter's Explore page to view Twitter without account. Then you can browse the breaking news in the world right now, just click it for checking the detailed information. And you'll find more related news, including videos, text, and photos.

How do I change my Twitter feed settings?

In the top menu, tap the icon. Tap the arrows to switch to the timeline view of your choice, or tap View content preferences to go to your settings. In the top menu, click the icon. Click the arrows to switch to the timeline view of your choice, or click View content preferences to go to your settings.


1 Answers

Update: Their is seems to be a request limit issue in this approach, use following answer https://stackoverflow.com/a/15419005/1228669

It uses STTwitter,

It contains a method to check request limit

- (void)getRateLimitsForResources:(NSArray *)resources // eg. statuses,friends,trends,help
                 successBlock:(void(^)(NSDictionary *rateLimits))successBlock
                   errorBlock:(void(^)(NSError *error))errorBlock {

use this method to check current api limit, as now the api limit is for 15 mins interval, for more details visit Twitter 1.1 API Limit

=================================

If you haven't found solution yet, you can try this approach

  1. Register your app at twitter https://dev.twitter.com/apps

  2. On bottom of app information page "click on Create my access token" button it will create access token and secret

  3. Download FHSTwitterEngine https://github.com/fhsjaagshs/FHSTwitterEngine

Use following code to set access token to twitter engine:

self.engine = [[FHSTwitterEngine alloc]initWithConsumerKey:@"yourAppConsKey" andSecret:@"yourAppsecret"];
OAToken *token = [[OAToken alloc] init];

token.key = @"setaccessToken";
token.secret = @"setAccessTokenSecret";
[self.engine setAccessToken:token];

You can try this method to get tweets

[self.engine getTimelineForUser:username isID:NO count:1];

Also make sure SystemConfiguration.framework is added in your project

like image 116
prasad Avatar answered Sep 29 '22 22:09

prasad