Facebook api and send invite to more than one friend in android -
i have problem inviting firend facebook api app. method:
private void invitefromfacebook(activity activity, list<graphuser> list) { for(int i=0; i<list.size(); i++) { //todo post invite friends wall // log.v("mainactivity", "user id: " + user.getid()); if(list == null || list.size() == 0) return; bundle parameters = new bundle(); string friendsidsinformat = ""; friendsidsinformat = friendsidsinformat + list.get(i).getid(); parameters.putstring("to", friendsidsinformat); parameters.putstring( "message", "use app!"); facebook mfacebook = new facebook( getresources().getstring(r.string.facebook_app_id)); // show dialog invitation mfacebook.dialog(activity, "apprequests", parameters, new facebook.dialoglistener() { @override public void oncomplete(bundle values) { // todo auto-generated method stub } @override public void oncancel() { // todo auto-generated method stub } @override public void onfacebookerror(facebookerror e) { // todo auto-generated method stub } @override public void onerror(dialogerror e) { // todo auto-generated method stub } }); } }
everyting ok, want send invitation many frieds, in codes show 1 dialog every person. how can show 1 dialog, many friends? possible or must every friend show dialog?
you can send comma delimited list in "to" field, "123,456,789".
be careful sending many requests though, don't want identified spam app.