Failed to upload image from android phone to facebook with title in android

I am using the facebookconnect plugin from github to upload images to my facebook timeline. I can now load the image form in the web url using the feed method by providing a link. However, it shows an error when I use the link for the image as file: /// path to img / img1.png. It is also important that I use a title for the image. The image exists in my phone storage.

The function I'm currently loading is:

function imgshare()
{

var z = 'http://33.media.tumblr.com/4f057b48f29f3c167a962380d1a35443/tumblr_mgofxc3zhm1qfwg0ho1_500.jpg';
n='Enjoy Life';
var options = { method:"feed",
                        picture: z,
                        name:n,
                        caption:'Shared via app',
                        description:'This is an image shared from my app'};



    facebookConnectPlugin.showDialog(options,
                                    function (result) {
                                        alert("Posted. " + JSON.stringify(result));                               
 },
                                    function (e) {
                                        alert("Failed: " + e);
                                    });

  }

      

Can anyone please help me.

+3


source to share


1 answer


The image must be at least 200px by 200px and remote, you cannot use a local image.

https://developers.facebook.com/docs/sharing/reference/feed-dialog/v2.2

also puts "var" in font n .. ie



var n = 'Enjoy Life';

another, then everything looks like it would work. I checked it out today and everything was fine.

-1


source







All Articles