Skip to content

Commit

Permalink
Merge pull request #395 from severedsea/master
Browse files Browse the repository at this point in the history
Added JSON response on FB.ui callback
  • Loading branch information
aogilvie committed Mar 5, 2014
2 parents c8b9589 + 613c1e4 commit e283230
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/android/ConnectPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,16 @@ public UIDialogListener(ConnectPlugin fba){
public void onComplete(Bundle values) {
// Handle a successful dialog
Log.d(TAG,values.toString());
this.fba.cb.success();
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) {
Expand Down

0 comments on commit e283230

Please sign in to comment.