Send Facebook request from android does not show message preview and does not send to friends -
in android app, after facebook login , authentication, user allowed send request friend invite them join app. moreover, need know invited, after user sends requests.
my problems following:
- when user wants send request, message preview not showing @ top of dialog box.
- when user tap on invite button, black screen cover dialog box. if tap on black cover, disappearing.
- when user selects friends , tap on send, request not going friends.
send request code following:
private void sendrequestdialog() { bundle params = new bundle(); params.putstring("message", "learn how make android apps social"); webdialog requestsdialog = (new webdialog.requestsdialogbuilder(fbloginactivity.this, session.getactivesession(), params)) .setoncompletelistener(new oncompletelistener() { @override public void oncomplete(bundle values, facebookexception error) { if (error != null) { if (error instanceof facebookoperationcanceledexception) { toast.maketext(fbloginactivity.this, "request cancelled", toast.length_short).show(); } else { toast.maketext(fbloginactivity.this, "network error", toast.length_short).show(); } } else { final string requestid = values.getstring("request"); if (requestid != null) { toast.maketext(fbloginactivity.this, "request sent", toast.length_short).show(); } else { toast.maketext(fbloginactivity.this, "request cancelled", toast.length_short).show(); } } } }).build(); requestsdialog.show(); }
i followed facebook send request implementation guide not getting same result.
note:
my application not published on play store yet.
app configuration on facebook developer dashboard: sand box disabled , has not submitted facebook permissions , approval.(i want know send request need that?)
i suspecting missing configuration on facebook app dashboard.
i appreciated help.
finally got answer. missing point sending request friend app provide facebook configuration handle request not mentioned in facebook documentation.
in facebook dashboard, go setting , add app on facebook (add platform section), facebook allocate page in facebook domain https://apps.facebook.com/your-name-space, set canvas url , canvas secure url bring url content canvas. (for more info how configure canvas url refer [this][https://devcenter.heroku.com/articles/configuring-your-facebook-app-as-a-canvas-page]
after when send request friends, friends recieve notification , when click on redirect https://apps.facebook.com/your-name-space.
Comments
Post a Comment