Skip to content

Commit e283230

Browse files
committed
Merge pull request #395 from severedsea/master
Added JSON response on FB.ui callback
2 parents c8b9589 + 613c1e4 commit e283230

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/android/ConnectPlugin.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,16 @@ public UIDialogListener(ConnectPlugin fba){
240240
public void onComplete(Bundle values) {
241241
// Handle a successful dialog
242242
Log.d(TAG,values.toString());
243-
this.fba.cb.success();
243+
JSONObject response = new JSONObject();;
244+
try {
245+
for(String key : values.keySet()) {
246+
response.put(key, values.getString(key));
247+
}
248+
} catch (JSONException e) {
249+
e.printStackTrace();
250+
} finally {
251+
this.fba.cb.success(response);
252+
}
244253
}
245254

246255
public void onFacebookError(FacebookError e) {

0 commit comments

Comments
 (0)