【发布时间】:2010-10-08 01:55:25
【问题描述】:
这是我的第一个 Web API 项目,所以我希望解决这个问题的方法不会太明显。
// Contstruct the http request
NSString *urlString = [NSString stringWithFormat:@"http://%@:%@@twitter.com/statuses/user_timeline/%@.xml?count=5", username, password, friend];
NSURL *url = [NSURL URLWithString:urlString];
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
// Recive the data from the synchronous request
NSData *urlData;
urlData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:nil error:nil];
从这个查询返回的结果看起来不错除了他们没有反映我是否收藏了它们。所有推文都返回“false”,即使验证用户已为它们加注星标。我相当有信心我正在正确地进行身份验证,因为需要身份验证的代码会正确运行。
【问题讨论】:
标签: objective-c twitter