2012-03-05 78 views

回答

0
facebook.authorize(Home.this,permission,new DialogListener() 
       { 
        public void onFacebookError(FacebookError e) { 
         // TODO Auto-generated method stub 
        } 

        public void onError(DialogError e) { 
         // TODO Auto-generated method stub 

        } 

        public void onComplete(Bundle values) { 
         // TODO Auto-generated method stub 
         try { 
          String str = facebook.request("me"); 
          JSONObject jsonObject = new JSONObject(str); 

          facebookid = jsonObject.getString("id"); 
          Log.e("", "facebook id :"+facebookid); 

          fbUserFullName = jsonObject.getString("name"); 
          fbUserEmail = jsonObject.getString("email"); 
          fbUserGender = jsonObject.getString("gender"); 
          fbUserBithday = jsonObject.getString("birthday"); 
       } 

        public void onCancel() { 
         // TODO Auto-generated method stub 
        } 
       }); 
相關問題