cannot post photo into facebook

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

Hi everybody. i have problem with post photo to facebook. This is my code:

b1.addEventListener('click', function() {
    Titanium.Media.openPhotoGallery({
        success:function(event)
        {
            b1.title = 'Uploading Photo...';
            var data = {picture: event.media};
            Titanium.Facebook.requestWithGraphPath('me/photos', data, 'POST', function(e){
            if (e.success) {
                alert("Success! Returned from FB: " + e.result);
            } else {
                if (e.error) {
                    alert(e.error);
                } else {
                    alert("Unknown result");
                }
            }
        });
        },
        cancel:function()
        {
        },
        error:function(error)
        {
        },
        allowEditing:true
    });
});
But when i post photo, it has message: "cannot find function requestWithGraphPath in object[Ti.Facebook]".

Help me please. Thanks.

— asked 3 years ago by test test
1 Comment
  • what version of of SDK are you using? what platform are you on?

    — commented 3 years ago by Aaron Saunders

Your Answer

Think you can help? Login to answer this question!