我当前的代码:
SLRequest *req = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodGET
URL:[NSURL URLWithString:@"http://api.twitter.com/1.1/statuses/user_timeline.json"]
parameters:[NSDictionary
dictionaryWithObjects:@[user]
forKeys:@[@"screen_name"]]];
[req performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
if (urlResponse.statusCode == 200){
id object = [NSJSONSerialization JSONObjectWithData:responseData options:0 error:nil];
completionBlock(object);
}else {
if (error == nil)
error = [API errorWithStatusCode:urlResponse.statusCode];
errorBlock(error);
}
}];
我确实在 dev.twitter.com 上创建了一个应用程序,但我不知道如何实现从 Twitter 获得的令牌。如何在用户不询问其 Twitter 帐户的情况下更新到 1.1?