【发布时间】:2012-08-16 23:20:31
【问题描述】:
你好我正在尝试实现Readability API 在我的应用程序中,但我得到的只是状态码 500 - “未知问题”。 我的响应正文是一个 html 页面,上面写着“Page unavalaivable”。
我正在使用 RestKit。
这是我尝试连接的方式:
-(void)sendRequests
{
NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:
@"myconsumerkey", @"oauth_consumer_key",
[NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]], @"oauth_timestamp",
[self uuid], @"oauth_nonce",
@"HMAC-SHA1", @"oauth_signature_method",
@"mysecretkey", @"oauth_consumer_secret",
@"1.0",@"oauth_version",
@"username", @"x_auth_username",
@"password", @"x_auth_password",
@"client_auth", @"x_auth_mode", nil];
RKClient *client = [RKClient clientWithBaseURL:[NSURL URLWithString:@"https://www.readability.com/api/rest/v1"]];
[client post:@"/oauth/access_token" params:params delegate:self];
}
非常感谢!
【问题讨论】:
标签: iphone ios cocoa-touch oauth restkit