}
}
<<<<<<< HEAD
/*
* Handles session state changes
*/
private void onSessionStateChange(SessionState state, Exception exception) {
final Session session = Session.getActiveSession();
// Check if the session is open
if (state.isOpened()) {
// Get user info
getUserInfo(session);
}
=======
class UIDialogListener implements DialogListener {
final ConnectPlugin fba;
public UIDialogListener(ConnectPlugin fba){
super();
this.fba = fba;
}
public void onComplete(Bundle values) {
// Handle a successful dialog
Log.d(TAG,values.toString());
JSONObject response = new JSONObject();;
try {
for(String key : values.keySet()) {
response.put(key, values.getString(key));
}
} catch (JSONException e) {
e.printStackTrace();
} finally {
this.fba.cb.success(response);
}
}
public void onFacebookError(FacebookError e) {
Log.d(TAG, "facebook error");
this.fba.cb.error("Facebook error: " + e.getMessage());
}
public void onError(DialogError e) {
Log.d(TAG, "other error");
this.fba.cb.error("Dialog error: " + e.getMessage());
}
public void onCancel() {
Log.d(TAG, "cancel");
this.fba.cb.error("Cancelled");
}
>>>>>>> e2832301d7294e1d1e0ab24e33ec97fd9498703d
}
/* |