0

Following along with the Fabric/Twitter Kit Documentation to display User Timeline. However the code from the docs doesn't build.

This is the code in my Timeline View Controller in the View Did Load.

[[Twitter sharedInstance] logInGuestWithCompletion:^(TWTRGuestSession    *guestSession, NSError *error) {
if (guestSession) {
    TWTRAPIClient *APIClient = [[Twitter sharedInstance] APIClient];
    TWTRUserTimelineDataSource *userTimelineDataSource = [[TWTRUserTimelineDataSource alloc] initWithScreenName:@"fabric" APIClient:APIClient];
    self.dataSource = userTimelineDataSource; // <- build fail here 
} else {
    NSLog(@"error: %@", [error localizedDescription]);
}

}];

Xcode complains: "Property 'datasource' not found on object of type 'TimelineViewController ". Not sure why it's acting up since this is basically verbatim from the Docs example.

Any help is greatly appreciated!

wambambizzle
  • 105
  • 7

1 Answers1

1

Talked to a friend, helped me figure it out

originally had this

@interface TimelineViewController : UIViewController

Needed to change it to this

@interface TimelineViewController : TWTRTimelineViewController

In the .h of the TimeLineViewController file, previously I was subclassing UIViewController instead of the "TWTRTimelineViewController" from Twitter Kit. The original class doesn't have a property of self.datasource. The Sub class of TWTRTimelineViewController on the other hand does.

wambambizzle
  • 105
  • 7
  • I'm encountering a similar issue with `TWTRTimelineViewController`. On your scene in interface builder, did you use a vanilla ViewController or a TableViewController? I messed around with the sample code and it did nothing, despite appearing to be a complete class. – Adrian Oct 05 '15 at 23:01