나는 며칠 동안이 작업을 해왔으며 무엇이 빠졌는 지 찾을 수 없습니다. 누구라도 조언을하나요?내 Facebook 앱이 초대 요청을 보내지 않는 이유는 무엇입니까?
뭔가 빠져있는 것처럼 보이지만 그게 뭔지 전혀 모르겠습니다.
오류가 나타나지 않을 것입니다. 공유 버튼이 작동하여 (자신의 벽에 공유하기 위해) 초대장이 아무 것도하지 않는 것처럼 보입니다.
나는 내 appid를 X로 바꿨다.
<html>
<head>
<title>App Name</title>
</head>
<body>
<div id="fb-root"></div>
<script>
var publish = {
method: 'stream.publish',
display: 'popup', // force popup mode
attachment: {
name: 'Connect',
caption: 'The Facebook Connect JavaScript SDK',
description: (
'A small JavaScript library that allows you to harness ' +
'the power of Facebook, bringing the user\'s identity, ' +
'social graph and distribution power to your site.'
),
href: 'http://app-address.com/'
}
};
function publish1() {
FB.ui(publish);//, Log.info.bind('stream.publish callback'));
}
</script>
<button class="btn" id="send-to-many">Send to Many</button>
<button onclick="publish1()">Click</button>
</body>
<script>
window.fbAsyncInit = function() {
console.log('Initing facebook...');
FB.init({
appId: 'xxxxxxxxxxxxxxx',
status: true,
frictionlessRequests: true,
cookie: true,
xfbml: true
});
console.log('... done');
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol +
'//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
document.getElementById('send-to-many').onclick = function() {
FB.ui({
method: 'apprequests',
message: 'This is a test of the App-Name invite.'
}, requestCallback);
function requestCallback(response)
{
if(response && response.request_ids) {
// Here, requests have been sent, facebook gives you the ids of all requests
//console.log(response);
location.href='home';
} else {
// No requests sent, you can do what you want (like...nothing, and stay on the page).
}
}
}
</script>
</html>
애플리케이션에 캔버스 URL이 설정되어 있습니까? – Lix
이 버그는 모든 앱에서 발생합니다. 제발, 다른 '생일'응용 프로그램을 만들지 마십시오. –
** 생일 ** 앱이 아니지만 통찰력에 감사드립니다. –