System.out.println("oauthCode: " + oauthCode);
try {
// アクセストークンの取得
AccessToken accessToken = facebook.getOAuthAccessToken(oauthCode);
String tokenString = accessToken.getToken();
// アクセスを2ヶ月有効トークンに変更
Map<String, String> params = new HashMap<String, String>();
params.put("client_id", Constants.FACEBOOK_APP_API_KEY);
params.put("client_secret", Constants.FACEBOOK_APP_API_SECRET);
params.put("grant_type", "fb_exchange_token");
params.put("fb_exchange_token", tokenString);
RawAPIResponse apiResponse = facebook.callGetAPI("/oauth/access_token", params);
String response = apiResponse.asString();
AccessToken newAccessToken = new AccessToken(response);
String newToken = newAccessToken.getToken();
if(newToken != null) {
User facebookUser = facebook.getMe();
loginUserModel.setFacebookAccessToken(new Text(newToken));