0

我搜索了很多,但我没有得到任何演示。我该如何将它集成到我的应用程序中?

我检查了许多来源,例如此答案此站点

4

1 回答 1

3

您好,我从您提供的链接http://dev.wechat.com/wechatapi下载了英文版 SDK 。结果发现缺少一些方法。在最新的1.5中文版中(所有评论都是中文)有类似的方法

+(BOOL) sendAuthReq:(SendAuthReq*) req viewController : (UIViewController*) viewController delegate:(id<WXApiDelegate>) delegate;

和类:

#pragma mark - SendAuthReq
@interface SendAuthReq : BaseReq
@property (nonatomic, retain) NSString* scope;
@property (nonatomic, retain) NSString* state;
@end

#pragma mark - SendAuthResp
@interface SendAuthResp : BaseResp
@property (nonatomic, retain) NSString* code;
@property (nonatomic, retain) NSString* state;
@property (nonatomic, retain) NSString* lang;
@property (nonatomic, retain) NSString* country;
@end

请求方法示例:

-(void)sendAuthRequest
{ 
    SendAuthReq* req =[[[SendAuthReq alloc ] init ] autorelease ];
    req.scope = @"snsapi_userinfo" ;
    req.state = @"123" ;
    [WXApi sendReq:req]; 
}

有兴趣的话这里是中文版下载链接

于 2015-06-12T12:00:18.410 回答