Share via Facebook Messenger App - ionic framework / Cordova apache


#1

I need to share a link from my app to the Facebook Messenger App, because I need to send to specific contacts. I tried the plugin SocialSharing-PhoneGap-Plugin and it looks like that’s possible on Android, example:

window.plugins.socialsharing.shareVia('com.facebook.orca', 'Message via FB', null, null, null, function(){console.log('share ok')}, function(msg) {alert('error: ' + msg)});

This seems to work but when I select the contacts and I press the send button, it freeze with loading popUp, and I can’t find the solution.

I need a solution for this plugin or a similar one. The objective is to share via Facebook Messenger on Android and iOS.

Thanks in advance.


#2

Have you received any error?


#3

Hi, no error received.


#4

I found the solution, I had to put the link url in the third ‘null’. Now to problem is to have it working on iOS. The bundle id of Facebook Messenger on iOS is com.facebook.Messenger but the SocialSharing-PhoneGap-Plugin API says this:
iOS: You are limited to ‘com.apple.social.[facebook | twitter | sinaweibo | tencentweibo]’. If an app does not exist, the errorcallback is invoked and iOS shows a popup message asking the user to configure the app.

Then I think there’s no solution for iOS… I would be very grateful if someone can tell me a solution for iOS.


#5

I would be very grateful if someone can tell me a solution for iOS. [2]