The goal
Share a simple image through the Facebook's wall.
The problem
Or, if someday the image go offline:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: redirect_uri is not owned by the application.
My question is: What I'm doing wrong?
The scenario
Firstly, I loads the Facebook's JavaScript SDK:
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: 'xxx',
channelUrl: '//localhost/channel.html',
status: true,
xfbml: true
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {
return;
}
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Secondly, there's the following button on my application:
<a href="#" onClick="publishOnFacebook()">
<i class="icons icon-facebook-big"></i></a>
The publishOnFacebook()
method is:
function publishOnFacebook() {
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple,
consistent interface for applications to
interface with users.'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
}
And finally, this is my app: