post pic on fb

You must Login before you can answer or comment on any questions.

post.addEventListener('click', function(e) {
    Titanium.Facebook.appid = '1234567891';
    Titanium.Facebook.permissions = ['publish_stream', 'read_stream'];
    Titanium.Facebook.addEventListener('login', function(e) {
        if(e.success) {
            Titanium.Facebook.requestWithGraphPath('me/feed', {
 
                message : "Checkout",
                picture : imageView.image
 
            }, "POST", function(e) {
                if(e.success) {
                    alert('now login..Liked!');
                }
            });
        }
    });
    Titanium.Facebook.authorize();
});
This is my facebook 'like' code, but picture is not posting on fb. When I remove picture then message is posting. Any solution..how to post picture on fb when click on like button?

1 Answer

Whats the value of imageView.image ? Are you using a local image within the app ?

— answered 12 months ago by Alexander Bauer
answer permalink
3 Comments
  • No..first i am uploading image to server and using php script I am getting URL of that image and passing that URL to imageView.image. My image size is about 1 MB. FYI: Small size images(>100 KB) are working well. How can I reduce image size?

    — commented 12 months ago by Lokesh Gupta

  • sorry <300 KB

    — commented 12 months ago by Lokesh Gupta

  • You could scale it down using php, see php.net/imagecopyresampled

    — commented 12 months ago by Alexander Bauer

Your Answer

Think you can help? Login to answer this question!