objective-c - iOS集成友盟社會化分享微信無法登錄?
問題描述
iOS集成友盟社會化分享SDK-5.0點擊微信登錄的時候出現無法獲取accessToken的現象,其他如QQ、微博都可以正常登錄使用。另外QQ、微博和微信分享都可以正常使用。望各位早日幫我解決或者分析一下。謝謝
//微信登錄之后的回調- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { BOOL result = [UMSocialSnsService handleOpenURL:url wxApiDelegate:nil]; if (result == FALSE) {//其他操作 } return result;}- (void)applicationDidBecomeActive:(UIApplication *)application { [UMSocialSnsService applicationDidBecomeActive];}//登錄代碼#pragma mark - - (IBAction)forgetClick3:(id)sender{ //此處調用授權的方法,你可以把下面的platformName 替換成 UMShareToSina,UMShareToTencent等UMSocialSnsPlatform *snsPlatform = [UMSocialSnsPlatformManager getSocialPlatformWithName:UMShareToWechatSession];snsPlatform.loginClickHandler(self,[UMSocialControllerService defaultControllerService],YES,^(UMSocialResponseEntity *response){if (response.responseCode == UMSResponseCodeSuccess) {UMSocialAccountEntity *snsAccount = [[UMSocialAccountManager socialAccountDictionary]valueForKey:UMShareToWechatSession];NSLog(@'username is %@, uid is %@, token is %@ url is %@',snsAccount.userName,snsAccount.usid,snsAccount.accessToken,snsAccount.iconURL); } });}
回調之后彈出‘服務器繁忙,授權失敗’,并且控制臺輸出以下信息:
[21:15:26.290( 2823)] - UMSocial: createSocialAction uid is 6076bfab5e98cf377649ede5f8b95e [21:15:26.296( 2823)] - UMSocial: You must set accessToken! [21:15:26.298( 2823)] - UMSocial: makeRequestWithPath is /share/token/54547f14fd98c53c5e00001f/, parameters is { ak = 54547f14fd98c53c5e00001f; 'app_id' = wxa922a6994c4ed428; 'app_secret' = afde0ccf8bfc94fecea5ff987e1ff28a; de = 'iPhone5,4'; dt = 1456319726292; ek = 63c4eacd667596610fe9a3038edddddd; en = WiFi; 'expires_in' = 0; mac = '02:00:00:00:00:00'; openudid = 3632d3ac95662f6d43e671c03cfeeefb6ddddddd; os = iOS; pcv = '2.0'; sdkv = '5.0'; to = wxsession; tp = 0; uid = 3076bfab5e98cf333649ede5fddddd; usid = '';} 2016-02-24 21:15:26.458 bangwa[777:203689] __39-[NewLoginViewController forgetClick2:]_block_invoke [Line 611] response is { data = {wxsession = { usid = '';}; }; responseCode = 200; responseType = 9; viewControllerType = 7;}
問題解答
回答1:你好,請問這個問題解決了嗎?我之前集成好了,但是今天突然發現出現了跟你一樣的問題。
相關文章:
1. css3 讓圖片變成灰色(filter),但針對IE11瀏覽器無效2. macos - 無法source activate python273. 運行python程序時出現“應用程序發生異常”的內存錯誤?4. java - 同步/異步與阻塞/非阻塞之間的差異具體是什么?5. html - vue里面:src在IE(9-11)下不顯示圖片6. java - butterknife怎么綁定多個view7. android - Genymotion 模擬器可以做屏幕適配檢測嗎?8. html5 - 前端面試碰到了一個緩存數據的問題,來論壇上請教一下9. javascript - 打算寫一個c++的node圖像處理模塊,有沒有推薦的c++圖片處理庫?10. html5 - 在HBuilder中打包Android的apk包出錯,不知道是什么原因。

網公網安備