Facebook Cordova plugin - sharing a photo (with no link) results in empty Share Dialog

January 19, 2017, at 06:27 AM

I'm using the cordova Facebook plugin (https://github.com/jeduan/cordova-plugin-facebook4) in a Meteor mobile app on Android.

I can successfully use the Share Dialog to share a photo with a link (as in the plugin example here: https://github.com/jeduan/cordova-plugin-facebook4#show-a-dialog). I.e...

  method: "share",
  href: "http://example.com",
  caption: "Such caption, very feed.",
  description: "Much description",
  picture: 'http://example.com/image.png'

However, if I attempt to share a photo-only (i.e. with no website link)...

  method: "share",
  name:'Test Post',
  message:'First photo post',
  caption: 'Testing using phonegap plugin',
  description: 'Posting photo using phonegap facebook plugin'
}, function (response) {
}, function (response) {

....the Share Dialog opens, but is empty.

This is exactly as per the final example given on the plugin's github (https://github.com/jeduan/cordova-plugin-facebook4#publish-a-photo) so I assume it's a valid use-case.

Any ideas?

Answer 1

You need to adjust the method to be "feed" instead of "share" if no link is provided.


 method: "share",


 method: "feed",
Android sequential touching buttons

Android sequential touching buttons

As I am new in Android programming, I need some help to implement the following scenario:

GoogleApiClient does not connect

GoogleApiClient does not connect

GoogleApiClient does not get connected i have seen some of similar questions but am not able to find a solution here is my code

Android move file to External Device with press of Button

Android move file to External Device with press of Button

I need to make a button so that it moves a specific file to the External DriveI have set the manifest so it allows to write to External Storage but I can not find the code to write a specific file to write to the External Storage