I used the old implementation of the Facebook apprequests dialog box in my project, for example:
Bundle parameters = new Bundle(); parameters.putString("message","invite friends message..."); parameters.putString("data","invite friends data..."); parameters.putString("title","invite friends dialog title..."); if (facebook != null){ facebook.dialog(getActivity(), "apprequests", parameters, new Facebook.DialogListener() { @Override public void onComplete(Bundle values) {
I found a new implementation in a facebook document. The application invites
appLinkUrl = "my app link..."; previewImageUrl = "my image url..."; if (AppInviteDialog.canShow()) { AppInviteContent content = new AppInviteContent.Builder() .setApplinkUrl(appLinkUrl) .setPreviewImageUrl(previewImageUrl) .build(); AppInviteDialog.show(activity, content); }
Is this the correct implementation for an app for friends or in any other way? if so, where will my message and data content be posted.
Or if I use api chart request, for example:
String graphPath="/me/apprequests/"; GraphRequest request = GraphRequest.newGraphPathRequest( accessToken, graphPath, graphCallback); Bundle parameters = new Bundle(); parameters.putString("message","invite friends message..."); parameters.putString("data","invite friends data..."); parameters.putString("title","invite friends dialog title..."); request.setParameters(parameters); request.executeAsync();
then receiving {"data":[]} in response, and the dialog box does not appear. What would be the correct implementation for this?