@Override public void onCompleted(GraphUser user, Response response) { // TODO Auto-generated method stub view.dismissLoading(); if (user == null) { view.showError(response.getError().getErrorMessage()); } else { l.d("facebook login result : " + user.getInnerJSONObject().toString()); SNSLoginData data = app().getUserConfig().loginData; data.nickName = user.getLastName() + user.getFirstName(); data.sns = EXTRA_AUTO_LOGIN_FACEBOOK; data.snsHome = user.getLink(); data.userId = (String) user.getProperty("email"); try { data.profileImage = ImageRequest.getProfilePictureUrl( user.getId(), FacebookModel.PROFILE_IMAGE_SIZE, FacebookModel.PROFILE_IMAGE_SIZE) .toString(); } catch (MalformedURLException e) { // TODO Auto-generated catch block e.printStackTrace(); } prefModel.setAutoLogin(true); prefModel.setAutoLoginAction(EXTRA_AUTO_LOGIN_FACEBOOK); loginModel.loginSNS(data); } }
@Override public void onTwitterUserInfoComplete(TwitterModel model, SNSLoginData data) { // TODO Auto-generated method stub view.dismissLoading(); prefModel.setAutoLogin(true); prefModel.setAutoLoginAction(EXTRA_AUTO_LOGIN_TWITTER); loginModel.loginSNS(data); }
@Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub ThemeUtils.darkNoTitle(this); super.onCreate(savedInstanceState); prefModel = new PreferenceModel(this); loginModel = new LoginModel(this); loginModel.setCallback(this); view = new SelectLoginMethodView(this); view.setCallback(this); setContentView(view); // 2013-02-20 자동로그인은 인트로에서 처리하도록 변경 // checkAutoLogin(); }