api - Facebook Wall Post Picture relative URL PhoneGap -
i post facebook wall local picture in phone gap project. here code.
function posttofeed() { // calling api ... var obj = { method: 'feed', redirect_uri: 'your url here', link: 'https://developers.facebook.com/docs/reference/dialogs/', picture: 'http://fbrell.com/f8.jpg', name: 'facebook dialogs', caption: 'reference documentation', description: 'using dialogs interact users.' }; function callback(response) { document.getelementbyid('msg').innerhtml = "post id: " + response['post_id']; } fb.ui(obj, callback); }
in line:
picture: 'http://fbrell.com/f8.jpg',
i tried change relative url like:
picture: '../blabla.png',
and continue getting error of api error code 100, picture url not correctly formatted. checked facebook api , not stated there. says:
the url of picture attached post. picture must @ least 50px 50px (though minimum 200px 200px preferred) , have maximum aspect ratio of 3:1
can me this? thanks.
iirc, picture need accessible on internet. thus, cannot use local images. – wmfairuz
the image url must absolute url – tommy crush
problem solved.
Comments
Post a Comment