어제 이어 한가지 더 질문 드리겠습니다.ㅜㅜ

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko"  xmlns:fb="http://www.facebook.com/2008/fbml">
 
 <head>
  <title>facebook login</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="content-language" content="kr" />
  <meta name="author" content="JH" />
  <meta name="description" content="facebook login" />
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
  <script type="text/javascript" src="//connect.facebook.net/ko_KR/all.js"></script>
  <script type="text/javascript" charset="utf-8">
 //페이스북 설정파일
  window.fbAsyncInit = function() {
   FB.init({
    appId  : '194720617345573',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML
    oauth  : true // enable OAuth 2.0 <!-- API가 번전업이 됬다는 소리입니다. 꼭 넣어 주세요 -->
  });
  };
  (function(d){
     var js, id = 'facebook-jssdk' if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/ko_KR/all.js";
     d.getElementsByTagName('head')[0].appendChild(js);
   }(document));


  function facebookLogin () {

  FB.login(function(response) {
    if (response.authResponse) {
     var uid = response.authResponse.userID;
     var accessToken = response.authResponse.accessToken;
     FB.api({
      method: 'fql.query',
      query: 'SELECT uid, name, username, email FROM user WHERE uid=' + uid
      },
      function(response) {
       var user = response[0];
       alert(user.name);
      }
     );
    } else {
     alert("Facebook 통신이 원활하지 않습니다. \n잠시후 다시 이용해주세요.");     
    }
   },
   { scope: "read_stream" }
   );
  }
</script>


</head>
 
<body>
 
 <div id="fb-root"></div>
<a href="nojavascript...facebookLogin();">페이스북 로그인 정보가져오기</a>
</body>
</html>

 

--------------------------------------------------FQL을 사용중입니다.. 그런데 돌리면 창이 뜬 후. 로그인을 합니다. 로그인을하면...

입력하신 URL은 해당 앱에서 허용되지 않습니다.:

One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

이러한 에러가 뜨더군요. ㅠ 외국 사이트에 올라와있는 답변을 참조해보면,

API ID 및 URL 주소가 잘못되엇다는 등에 말이 더라구요..

ID는 정확하구요.. URL주소 같은 경우에는.. 어제 제가 돌리던 소스 그대로 설정 해놓은거라 건드린게 없어요..

기존에 토큰을 얻는 로그인인증에도 썻던 그 URL주소입니다.. 그런데 지금 올린 jsp 에서 어떤게 문제인지 모르겟네요...

한가지 더 질문은... 페이스북 홈페이지에서 URL설정하는 그 URL은 callbackURL과 다른 애인가요?

... 아무리 찾아보ㅕㄴ서 공부해도 ..와닿질 안습니다.ㅠㅠㅠㅠㅠ

 

 

좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
좋은 정보와 인맥을 동시에, 워드프레스 사용자 단톡방 참여하기