내 페이지에서 사람들은 공유 버튼을 누르고 Facebook에 게시 할 수 있습니다.응답. 이름 또는 ID를 얻으려고 시도합니다.
window.fbAsyncInit = function() {
FB.init(
{
"appId" : "<?php echo $fbid; ?>",
"status" : true,
"cookie" : true,
"xfbml" : true,
"oauth" : true
});
기능 showStreamPublish을 클릭에 시작 : 은이 코드를 사용하여 나는 다음과 같은 코드를 사용
function showStreamPublish() {
FB.ui(
{
method: 'feed',
name: 'Text',
caption: 'Text',
link: 'Link',
picture:'Pic',
description: 'ni',
user_message_prompt: 'Share it!'
},
function(response) {
if (response && response.post_id) {
FB.api('/me', function(response)
{alert(response.name);
}); ...
내가 Sahre을했던 사람의 이름을 보여 싶어하지만 :(나던
FB.api('/me', function(response)
{alert(response.name);
});
어떻게 사용자 이름 또는 공유했던 persob의 사용자 ID를 얻을 수 그것은 경고-상자를 엽니 다 - 컨텐츠로서 "정의되지 않은"로 . 도움 주셔서 감사합니다.
response.status를 얻으 려하고 이상한 점은 : 내 앱을 통해 연결하여 Facebook에 게시하더라도 내 앱을 통해 연결되지 않는다는 메시지가 나타납니다. 그 코드 사용 :
if (response.status === 'connected') {
// the user is logged in and has authenticated your app
alert('All good');
}else if (response.status === 'not_authorized') {
// the user is logged in but NOT through your app
alert('Not good');
}else{
alert('What the heck?');// the user isn't logged in to Facebook.
}
});
닐
의 중복 가능성 [페이스 북 기능 (응답) (http://facebook.stackoverflow.com/questions/15427821/facebook-functionresponse) – CBroe