public static void setupAppCallForWebDialog(
AppCall appCall,
String actionName,
Bundle parameters) {
Validate.hasFacebookActivity(FacebookSdk.getApplicationContext());
Validate.hasInternetPermissions(FacebookSdk.getApplicationContext());
Bundle intentParameters = new Bundle();
intentParameters.putString(NativeProtocol.WEB_DIALOG_ACTION, actionName);
intentParameters.putBundle(NativeProtocol.WEB_DIALOG_PARAMS, parameters);
Intent webDialogIntent = new Intent();
NativeProtocol.setupProtocolRequestIntent(
webDialogIntent,
appCall.getCallId().toString(),
actionName,
NativeProtocol.getLatestKnownVersion(),
intentParameters);
webDialogIntent.setClass(FacebookSdk.getApplicationContext(), FacebookActivity.class);
webDialogIntent.setAction(FacebookDialogFragment.TAG);
appCall.setRequestIntent(webDialogIntent);
}