微信登入App key APPdelegate.m
#import <UMShare/UMShare.h> #import <UMCommon/UMCommon.h> #import <UShareUI/UShareUI.h> #import <UMShare/UMShare.h>//登入
-
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [UMConfigure initWithAppkey:@“5b78e419f29d9836d10007fc” channel:@“App Store”];
// UMConfigure 通用設定,請參考SDKs整合做統一初始化。 // 以下僅列出U-Share初始化部分 // U-Share 平臺設定 [self configUSharePlatforms]; [self confitUShareSettings]; // Custom code
return YES; }
-
(void)confitUShareSettings { /*
- 開啟圖片水印 / //[UMSocialGlobal shareInstance].isUsingWaterMark = YES; /
- 關閉強制驗證https,可允許http圖片分享,但需要在info.plist設定安全域名 NSAppTransportSecurity NSAllowsArbitraryLoads */ //[UMSocialGlobal shareInstance].isUsingHttpsWhenShareContent = NO; }
-
(void)configUSharePlatforms { /* 設定微信的appKey和appSecret *///wxe3231f129e22e9c8/wx56e8f8ab99b3da0d [[UMSocialManager defaultManager] setPlaform:UMSocialPlatformType_WechatSession appKey:@“wx56e8f8ab99b3da0d” appSecret:@“ad7529bbe8c0caaef1652429c1dc260a” redirectURL:@“http://mobile.umeng.com/social”]; }