友盟分享在appdelegate中的调用语句举例

时间:2021-08-20 10:38:05

//友盟

[UMSocialData setAppKey:UmengAppkey];

[UMSocialConfig setSupportedInterfaceOrientations:UIInterfaceOrientationMaskPortrait];

//wechat

[UMSocialWechatHandler setWXAppId:WeChatAPPId appSecret:WeChatSecretKey url:WeChatRedirectURL];

//qq

[UMSocialQQHandler setQQWithAppId:QQAppId appKey:QQAppKey url:QQRedirectURL];

在pch文件中如下定义

//umeng

#define UmengAppkey @"55652d8567e58ea67***3d11"

//wechat

#define WeChatAPPId @"wx78fd9db6e535b***"

#define WeChatSecretKey @"927*afd064a653c53344c601a461cf22"

#define WeChatRedirectURL @""

//weibo

#define WeiboAppKey @"1587215***"

#define WeiboSecretKey @"32ce36858**94459b46fb3173063ec52"

#define WeiboRedirectURI @"https://api.weibo.com/oauth2/default.html"

//QQ

#define QQAppId @"11323189***"

#define QQAppKey @"Fef2Q91y*3jiijERS"

#define QQRedirectURL @""