Skip to content

Commit 7e4a62c

Browse files
committed
Added JSON response on FB.ui callback
1 parent b85a188 commit 7e4a62c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/android/ConnectPlugin.java

+9-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,15 @@ 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+
try {
244+
JSONObject response = new JSONObject();
245+
for(String key : values.keySet()) {
246+
response.put(key, values.getString(key));
247+
}
248+
this.fba.cb.success(response);
249+
} catch (JSONException e) {
250+
e.printStackTrace();
251+
}
244252
}
245253

246254
public void onFacebookError(FacebookError e) {

0 commit comments

Comments
 (0)