How to Send Request to all facebook friends in facebook 3.0 android -
i have send app request friends here using code send request 1 friend it's working fine want send request multiple/all friends
private void sendrequestdialog() { bundle params = new bundle(); params.putstring("to", "1782990807"); params.putstring("message", "learn how make android apps social"); webdialog requestsdialog = (new webdialog.requestsdialogbuilder( logout.this, session.getactivesession(), params)) .setoncompletelistener(new oncompletelistener() { @override public void oncomplete(bundle values, facebookexception error) { if (error != null) { if (error instanceof facebookoperationcanceledexception) { toast.maketext( logout.this.getapplicationcontext(), "request cancelled", toast.length_short) .show(); } else { toast.maketext( logout.this.getapplicationcontext(), "network error", toast.length_short) .show(); } } else { final string requestid = values .getstring("request"); if (requestid != null) { toast.maketext( logout.this.getapplicationcontext(), "request sent", toast.length_short) .show(); } else { toast.maketext( logout.this.getapplicationcontext(), "request cancelled", toast.length_short) .show(); } } } }).build(); requestsdialog.show(); }
here passing facebook id of 1 friend how send all/multiple friends have facebook id of friends need urgently advance :)
just remove line params.putstring("to", "1782990807"); , choose friends.you can choose multiple friends.
Comments
Post a Comment