コード例 #1
0
 void OAuth2CallBack(bool isSucess, DoubanSdkAuthError err, DoubanSdkAuth2Res response)
 {
     if (null != OAuth2VerifyCompleted)
         OAuth2VerifyCompleted(isSucess, err, response);
 }
コード例 #2
0
 private void LoginVerifyBack(bool isSucess, DoubanSdkAuthError errCode, DoubanSdkAuth2Res response)
 {
     if (errCode.errCode == DoubanSdkErrCode.SUCCESS)
     {
         PreferenceHelper.SetPreference("Douban_Token", response.accesssToken);
         PreferenceHelper.SavePreference();
         refreshMyDoubanAccountIDAndGoback();
     }
     else if (errCode.errCode == DoubanSdkErrCode.NET_UNUSUAL)
     {
         Deployment.Current.Dispatcher.BeginInvoke(() =>
         {
             MessageBox.Show("检查网络");
         });
     }
     else if (errCode.errCode == DoubanSdkErrCode.SERVER_ERR)
     {
         Deployment.Current.Dispatcher.BeginInvoke(() =>
         {
             MessageBox.Show("服务器返回错误,错误代码:" + errCode.specificCode);
         });
     }
 }