douban-objc-client
douban-objc-client copied to clipboard
方法一:添加项目依赖,找不到头文件
按照方法一:添加项目依赖,找不到头文件。 开发环境:Xcode 5
我也是找不到头文件。
这个我一直没解决,而且这个库不支持64位,很有必要新写一个了
不支持64位,郁闷哦
求适配64位啊!
有一种方法,该部署配置,bulid setting -> architecture -> $(ARCHS_STANDARD_32_BIT) 这样就能解决,不过这里只能改为32位,不是长久之计,顺便弱弱问一句,豆瓣提供音乐 搜索 和 下载 的接口吗?我找了很久好像没发现
没有, 不过可以通过 http 请求 hack。具体方法可以参考这个个豆瓣 fm 的库:https://github.com/taizilongxu/douban.fm
最后我自己用ASIHTTPRequest实现了Auth。
- (ASIFormDataRequest *)formRequest {
NSURL *URL = [NSURL URLWithString:kDBTokenUrl];
ASIFormDataRequest *req = [ASIFormDataRequest requestWithURL:URL];
[req setRequestMethod:@"POST"];
[req setValidatesSecureCertificate:NO];
[req setAllowCompressedResponse:YES]; // YES is the default
[req setTimeOutSeconds:30];//超时时间30s
[req setPostValue:kDBAppKey forKey:@"client_id"];
[req setPostValue:kDBSecret forKey:@"client_secret"];
[req setPostValue:kDBRedirectURL forKey:@"redirect_uri"];
return req;
}
ASIFormDataRequest *req = [self formRequest];
req.delegate = self;
[req setPostValue:@"authorization_code" forKey:@"grant_type"];
[req setPostValue:code forKey:@"code"];
[req startAsynchronous];