2012-06-26 5 views
1

저는 Facebook API를 처음 접했고 페이스 북 인증과 관련된 몇 가지 질문이 있습니다. 응용 프로그램을 만들고 도메인과 URL을 편집했습니다.Facebook 인증 API

<div id="fb-root"></div> 
    <script> 
    window.fbAsyncInit = function() { 
     FB.init({ 
     appId  : '3347207XXXXXXXX', // App ID (I've replaced for security reasons) 
     channelUrl : 'http://giftme.web44.net/channel.html/', // Channel File 
     status  : true, // check login status 
     cookie  : true, // enable cookies to allow the server to access the session 
     xfbml  : true // parse XFBML 
     }); 
     // Additional initialization code here 
    }; 
    // Load the SDK Asynchronously 
    (function(d){ 
     var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; 
     if (d.getElementById(id)) {return;} 
     js = d.createElement('script'); js.id = id; js.async = true; 
     js.src = "//connect.facebook.net/en_US/all.js"; 
     ref.parentNode.insertBefore(js, ref); 
    }(document)); 
    </script> 

그리고에만이있는 페이지 'channel.html'를 만들었습니다 :

Website Domain giftme.web44.net Site URL http://www.giftme.web44.net/

내가 내 사이트 웹 페이지에서 다음을 사용

<script src="//connect.facebook.net/en_US/all.js"></script> 

마지막으로 내가 사용하는 로그인 버튼 :

<div class="fb-login-button" >Login with Facebook</div> 

내가 뭘 잘못하고있어? 나는이 오류가 계속 :

API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: Invalid redirect_uri: A URL informada não é permitida pela configuração do aplicativo.

답변

1

http://www.giftme.web44.net/ 앱 속성에 정의 된 사이트의 URL 또는 캔버스 URL을 포함해야 http://giftme.web44.net/

+0

그러나 페이스 북이 모두 동일한 허용하지 않습니다 ... 난 이미 변경 –

+0

, 지금은 모두 HTTP입니다 : // giftme. web44.net –

0

REDIRECT_URL 동일하지 않습니다.

예는 다음과 같습니다

https://api.facebook.com/method/admin.setAppProperties? 
    access_token=CURRENTTOKEN& 
    properties={'post_authorize_redirect_url':'http://giftme.web44.net/channel.html/'} 

Error code 191
FB App Properties

+0

어디에 redirect_url을 정의 할 수 있습니까? –

+0

어디에서 redirect_uri를 찾을 수 있습니까? 아니면 스크립트에 추가해야합니까? 캔버스 URL을 설정해야합니까? –

+0

답변이 업데이트되었습니다. – Drewness