youtube收件箱问题

| 我正在尝试以编程方式(使用gdata api)从youtube帐户检索传入的消息。 我的请求:
NSURL *url = [NSURL URLWithString:@\"http://gdata.youtube.com/feeds/api/users/my_nick/inbox\"];

NSMutableURLRequest *inboxRequest = [NSMutableURLRequest requestWithURL:url];

NSString *authStr = [NSString stringWithFormat:@\"GoogleLogin auth=%@\", authMarker];

[inboxRequest setValue:authStr forHTTPHeaderField:@\"Authorization\"];
[inboxRequest addValue:@\"Content-Type\" forHTTPHeaderField:@\"application/x-www-form-urlencoded\"];
[inboxRequest setHTTPMethod:@\"GET\"];

NSHTTPURLResponse *response = NULL;

NSData *responseData = [NSURLConnection sendSynchronousRequest:inboxRequest returningResponse:&response error:nil];

NSString *responseDataString = [[NSString alloc] initWithData:responseData encoding:NSASCIIStringEncoding];

NSLog(@\"\\n%@\\n\", responseDataString);
NSLog(@\"\\n%@\\n\", [inboxRequest ]);
返回没有条目的供稿...(尽管我可以在网站上看到传入的消息) 这是nslog的回应:
<?xml version=\'1.0\' encoding=\'UTF-8\'?><feed xmlns=\'http://www.w3.org/2005/Atom\' xmlns:openSearch=\'http://a9.com/-/spec/opensearchrss/1.0/\'><id>http://gdata.youtube.com/feeds/api/users/thisistestnick/inbox</id><updated>2011-06-16T14:45:00.475Z</updated><category scheme=\'http://schemas.google.com/g/2005#kind\' term=\'http://gdata.youtube.com/schemas/2007#videoMessage\'/><title type=\'text\'>Inbox of thisistestnick</title><logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo><link rel=\'alternate\' type=\'text/html\' href=\'http://www.youtube.com/my_messages?folder=inbox&amp;filter=videos\'/><link rel=\'http://schemas.google.com/g/2005#feed\' type=\'application/atom+xml\' href=\'http://gdata.youtube.com/feeds/api/users/thisistestnick/inbox\'/><link rel=\'http://schemas.google.com/g/2005#batch\' type=\'application/atom+xml\' href=\'http://gdata.youtube.com/feeds/api/users/thisistestnick/inbox/batch\'/><link rel=\'self\' type=\'application/atom+xml\' href=\'http://gdata.youtube.com/feeds/api/users/thisistestnick/inbox?start-index=1&amp;max-results=25\'/><author><name>thisistestnick</name><uri>http://gdata.youtube.com/feeds/api/users/thisistestnick</uri></author><generator version=\'2.0\' uri=\'http://gdata.youtube.com/\'>YouTube data API</generator><openSearch:totalResults>0</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage></feed>
怎么了?请帮助。     
已邀请:
        为什么您不能使用gdata-objectivec lib api而是自己进行解析?我没有尝试检索“收件箱”,但在获取所需信息方面相当成功。使用它的优点是: a)您以本机格式(字符串和字典)获取信息,lib为您解析提要。 b)主要是,不会有任何解析/ api理解错误(我想这是您遇到问题的原因)。     

要回复问题请先登录注册