0

I have searched a lot but I am not getting any of the demo. How could I go about integrating it into my app?

I checked many sources like this answer or this site

Community
  • 1
  • 1
Gaurav Gilani
  • 1,584
  • 14
  • 18
  • They have provided demo application.. Get it from here http://dev.wechat.com/wechatapi/download – Nilesh Patel Apr 16 '15 at 07:19
  • I used that demo they are not providing any API integration demo to get Userinfo. – Gaurav Gilani Apr 16 '15 at 07:23
  • You can describe what problem you meet.Maybe I can help you. – SeanChense Apr 16 '15 at 08:47
  • @SeanChense, I want to fetch the user information when i click on "Login with WeChat" button. I am not getting any of the demo where i can see the wechat api integration. Please provide some demo if you know. – Gaurav Gilani Apr 16 '15 at 09:41
  • [Here is a Swift guide](http://stackoverflow.com/a/35862318/3681880) for integrating WeChat into an app. – Suragch Mar 08 '16 at 09:21
  • Check here for adding login with we chat function to your app: http://stackoverflow.com/questions/38069029/how-do-i-do-authorization-and-login-with-wechat-using-the-ios-sdk/38069132#38069132 – Kex Jun 28 '16 at 07:04

1 Answers1

3

Hi I download the English version SDK from the link http://dev.wechat.com/wechatapi you provided. It turns out to be missing some methods. In the latest version 1.5 in Chinese(all the comments are Chinese) there are methods like

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

and classes:

#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

the request method sample:

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

Here is the Chinese version download link if you are interested

dopcn
  • 4,218
  • 3
  • 23
  • 32
  • Right! Look for Chinese version – San Jun 10 '16 at 08:18
  • You also need the openID and access code to do login. Example here http://stackoverflow.com/questions/38069029/how-do-i-do-authorization-and-login-with-wechat-using-the-ios-sdk/38069132#38069132 – Kex Jun 28 '16 at 07:07