Showing user timeline using API 1.1 in iOS App


#1

I do not know what is happening - but I can not find my previous posts.
I am trying to follow this: https://dev.twitter.com/docs/api/1.1/post/oauth2/token
I get the access_token just fine.

So then I move on to getting the user timeline.
NSString *accessTokenHeaderToPost = [NSString stringWithFormat:@“Bearer %@”, accessTokenString64];

twitURL = @"https://api.twitter.com/1.1/statuses/user_timeline.json?count=30&screen_name=skillsusari";
request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString: twitURL]];
[request setHTTPMethod:@"GET"];
[request setValue:accessTokenHeaderToPost forHTTPHeaderField:@"Authorization"];
responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&err];
responseString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];

NSLog (@"RESP: %@", err);

I get an error about bad authentication.


#2

I finally just got this figured out on iOS using Application authentication.
I was getting my token ok - but when I submitted the token with the user timeline request, it was giving me bad authentication. Reading thru the doc I thought it told me to convert my token to base64. but apparently it was already being returned to me base64. once I changed that, all is well. the rest of my code worked as before with API 1. whew!