2011-03-11 4 views

답변

0

사용자가 페이지/응용 프로그램 (그들이 그것을 좋아하는 경우 즉,), 당신은 같은 것을 할 수 있어야에 연결되어있는 경우 :

<div id="fb-root"></div> 
    <script src="http://connect.facebook.net/en_US/all.js"></script> 
    <script type="text/javascript"> 
    FB.init({ 
    appId : '<?= $app_id; ?>', 
    status : true, // check login status 
    cookie : true, // enable cookies to allow the server to access the session 
    oauth : true // enable OAuth 2.0 
    }); 
    function friends() { 
    FB.api('/me/friends', function(response) { 
     console.log(response); 
    }); 
    } 
    </script> 

    <button onclick="friends();return false;">Show friends</button> 

그런 다음 반복하는 당신에게 달려있을 것이다 response.data를 선택하고 수행 할 작업을 결정하십시오. 난 그냥 페이지 에서이 테스트 및 확인 작동하는 것 같습니다.