第三方登录
[代码]java代码:
| 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | //登录  publicvoidlogin(View v){      Platform platform11 = ShareSDK.getPlatform(QQ.NAME);      //platform11.SSOSetting(true);          platform11.authorize();          platform11.showUser(null);//必须要加的要不然不行!这个才是授权的!          tm = (TelephonyManager) MainActivity.this.getSystemService(TELEPHONY_SERVICE);           imi = tm.getDeviceId();          platform11.setPlatformActionListener(newPlatformActionListener() {              @Override              publicvoidonError(Platform platform11, intarg1, Throwable arg2) {                  //弹出失败窗口              }              @SuppressLint("SimpleDateFormat") @Override              publicvoidonComplete(Platform platform11, intarg1, HashMap<string, object=""> arg2) {                  System.out.println("登录成功。。。。");                  Toast.makeText(MainActivity.this, "登录成功。。。。", 0).show();                                                                                          /*String userId = platform11.getDb().getUserId();                  String userName = platform11.getDb().getUserName();                  String token = platform11.getDb().getToken();                  long expiresTime = platform11.getDb().getExpiresTime();                  SimpleDateFormat sdf3 = new SimpleDateFormat("yyyy-MM-dd HH:mm");                  System.out.println("userId    "+userId);                  System.out.println("userName    "+userName);                  System.out.println("token     "+token);                  System.out.println("expiresTime  "+sdf3.format(expiresTime));                  HttpUties ht=new HttpUties();                  ht.UplodePhotos(1+"", userId+"", userName+"", token+"", expiresTime+"", imi+"");*/              }              @Override              publicvoidonCancel(Platform arg0, intarg1) {                                }          });  }</string,> | 
    失败是什么?没有什么,只是更走近成功一步;成功是什么?就是走过了所有通向失败的路,只剩下一条路,那就是成功的路。
 
                     
                    
                 
                    
                 
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号