1

I am trying to send a message to a user through private inbox with Phonegap and the phonegap facebook plugin through this functionality:

https://developers.facebook.com/docs/sharing/reference/send-dialog

So when doing this :

FB.ui({
  app_id:'XXXXXXXXX',
  method: 'send',
  name: "This is the name",
  link: 'www.google.com',
  to:to,
  description:'This is the description'
});

as stated in this link : Send private messages to friends

Nothing happen. Why ? Is it supported by the plugin ?

Please help.

Thanks

Community
  • 1
  • 1
Miles M.
  • 4,089
  • 12
  • 62
  • 108

1 Answers1

1

I am trying to implement the private message function in phonegap build, but it seems like its only working on desktop not in mobile device.

when I change the method from send to feed, and indicate display to touch.

It works on my IOS build, the window just popup

FB.ui({
  app_id:'XXXXXXXXX',
  method: 'feed',
  link: 'www.google.com',
  to:to,
  display: touch
});

However, its not working any more when I change the method back to send.

I believe facebook api don't support FB.UI send method in mobile devices, just like what they already mentioned on their page: https://developers.facebook.com/docs/sharing/reference/send-dialog

"This dialog can be used with the JavaScript SDK and by performing a full redirect to a URL. It is not supported on mobile devices."

I STILL DON'T KNOW HOW TO SEND PRIVATE MESSAGE THROUGH FACEBOOK NOW, GOOD LUCK

  • I really don't understand this either. Did you ever get to the bottom of this? I notice that the BBC (bbc.co.uk) have a dirty hack where they switch from the send dialog to the http://fb-messenger/ deep linking type address based on the screen size. Id really like to know if there is a real solution for this. Using the official Facebook share iframe that I can't customize really isn't acceptable for my use case. – Luke Aug 29 '17 at 19:27