2014-11-29 4 views
0

프로젝트가 있습니다. here입니다. 소셜 네트워킹 앱과 우리의 앱을 연결하는 공통점 인 소셜 연결 API입니다. 프로젝트는 정상적으로 작동합니다. 로그 cat에 사용자 프로필 세부 정보를 표시하면됩니다.SocialAuth API를 사용하여 프로필 세부 정보 표시

private final class ResponseListener implements DialogListener { 
    @Override 
    public void onComplete(Bundle values) { 
     adapter.getUserProfileAsync(new ProfileDataListener());     

} 
private final class ProfileDataListener implements SocialAuthListener<Profile> { 

    public void onExecute(Profile t) { 

     Log.d("Custom-UI", "Receiving Data"); 
     Profile profileMap = t; 
     Log.d("received profile info",t.toString()); 

     Log.d("Custom-UI", "Validate ID   = " + profileMap.getValidatedId()); 
     Log.d("Custom-UI", "First Name   = " + profileMap.getFirstName()); 
     Log.d("Custom-UI", "Last Name   = " + profileMap.getLastName()); 

     /* Log.d("Custom-UI", "Email    = " + profileMap.getEmail()); 
     Log.d("Custom-UI", "Country    = " + profileMap.getCountry()); 
     Log.d("Custom-UI", "Language   = " + profileMap.getLanguage()); 
     Log.d("Custom-UI", "Location   = " + profileMap.getLocation()); 
     Log.d("Custom-UI", "Profile Image URL = " + profileMap.getProfileImageURL());*/ 

    } 

    @Override 
    public void onError(SocialAuthError arg0) { 
     // TODO Auto-generated method stub 

    } 

    @Override 
    public void onExecute(String arg0, Profile arg1) { 
     // TODO Auto-generated method stub 

    } 

} 

는 로그 캣 프로파일 정보를 인쇄하지 않습니다 나는 튜토리얼 here에 주어진 다음 코드를 시도했다. 누구든지 주어진 링크를 사용하여 변경할 수 있습니까?

답변

0

이렇게 코드를 업데이트하십시오.

private final class ProfileDataListener implements SocialAuthListener<Profile> { 

@Override 
public void onError(SocialAuthError arg0) { 
    // TODO Auto-generated method stub 

} 

@Override 
public void onExecute(String arg0, Profile t) { 

     Log.d("Custom-UI", "Receiving Data"); 
     Log.d("Custom-arg0", arg0); 
     Profile profileMap = t; 
     Log.d("Custom-UI", "Validate ID   = " + profileMap.getValidatedId()); 
     Log.d("Custom-UI", "First Name   = " + profileMap.getFirstName()); 
     Log.d("Custom-UI", "Last Name   = " + profileMap.getLastName()); 
     Log.d("Custom-UI", "Email    = " + profileMap.getEmail()); 
     Log.d("Custom-UI", "Gender     = " + profileMap.getGender()); 
     Log.d("Custom-UI", "Country     = " + profileMap.getCountry()); 
     Log.d("Custom-UI", "Language     = " + profileMap.getLanguage()); 
     Log.d("Custom-UI", "Location     = " + profileMap.getLocation()); 
     Log.d("Custom-UI", "Profile Image URL = " + profileMap.getProfileImageURL()); 
} 
} 
관련 문제