I am trying to use the Facebook Javascript SDK feed dialogue to create a share button on my app. I am using the php sdk on my app which is a codeigniter build deployed on Facebook.
I used the following on my php page.
<script type="text/javascript">
function share(){
FB.ui({
method: 'feed',
link: 'https://apps.facebook.com/myapp',
caption: 'An example caption',
}, function(response){});
}
</script>
<button onclick="share()">Share this Video</button>
When I attempt to run this on my canvnas page, (when button is clicked), I get a pop up with error:
An error occurred. Please try later
.
On localhost, when I try this I get a pop up with error:
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.
I've been looking at other question with similar problems but now luck in getting this working.
How can I fix my code to work so that when the button is clicked, I get a prompt to publlish to my wall, and enter a message.
Can this be done with the php?
EDIT:
Did some checking, does this fb.ui need to be used with this, or can it be used?