I have the following in my source code. I get the alert “No Response” and then the facebook page says
“An error occurred with MYAPP. Please try again later”
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js" charset="utf-8"></script>
<script>
FB.init({appId: 'MYAPPID',status: true, cookie:true, xfbml: true});
</script>
<script>
FB.getLoginStatus(function(response){
if(!response.session){
alert("NO RESPONSE");
top.location.href="http://www.facebook.com/dialog/oauth?client_id=MYAPPID&redirect_uri=http://MYWEBSITE";
}
});
Can’t see where/if I have gone wrong here.
Thanks
I am getting now the following error:
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not allowed by the Application configuration.
You are using older login code. For FB.init, you should be setting
oauth: trueand you will want to check response.authResponse instead of response.session.