Facebook FB.ui send method not working on mobile web and need alternative -


i trying allow users of app notify multiple facebook friends need them vote favorite item on web page. have been using fb send method (https://developers.facebook.com/docs/reference/dialogs/send/) , has been working fine on desktop (code below) realized overlooked says in docs dialog "not supported on mobile devices."

are there alternatives send method allow user send private message friends mobile browsers? perhaps way trick api thinking it's desktop?

i'm open using fb dialog long it: 1) functional mobile browsers 2) allows pre-populating of recipients , 3) private between sender , recipient such private message or notification.

any ideas appreciated. thanks

code fb send method:

function resetselector(){  $('#fs-user-list').empty();   $(".mutual-friends-link").fselector({  max: 5, excludeids: exclusions, facebookinvite: false, lang: {   title: "pick mutual friends vote on gifts (last step)",   buttonsubmit: "add accomplices",   selectedlimitresult: "limit {5} people." }, closeonsubmit: true, onsubmit: function(response){   var accompliceuid;   accomplices = response;   $('#index-accomplices').empty()   var = 0    var fb_notification = function(accomplice, poll_id){     fb.api('https://graph.facebook.com/', 'post', {         id: "http://giftadvisor.herokuapp.com/polls/" + poll_id,         scrape: true       }, function(response){         fb.ui({         method: 'send',         to: [accomplice],         link: "http://giftadvisor.herokuapp.com/polls/" + poll_id,           }, fbcallback)       })     }    var fbcallback = function(){     console.log(i++)     if (i === accomplices.length){       window.location = "/polls/" + poll.id     }   }     _.each(accomplices, function(accomplice){       $('#index-accomplices').append('<img class="accomplices" src="http://graph.facebook.com/' + accomplice + '/picture?type=large">');        user = new user({uid: accomplice});       user.save(null,         {success: function(response){           console.log("users saved")           console.log(response.attributes.uid);           vote = new vote();           vote.save({             user_id: response.attributes.id,              poll_id: poll.id,              image_url: "http://graph.facebook.com/" + response.attributes.uid + "/picture"             },{success: function(response){               fb_notification(accomplice, poll.id);             }           }         );         }});     });   // }});  }, onclose: function(){    // fb_notification(accomplices, poll.id); } 

}); }

the thing i've seen approximating use now-deprecated chat api. see, example, what grouper does.

send dialog want, failure on mobile web makes useless. have found other approaches may work?


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -