そのように、事前に指定された宛先でダイアログをポップアップしようとしています:
FB.init({
appId : 'MYAPPID',
status : true,
cookie : true,
xfbml : true,
frictionlessRequests: true
});
function sendRequestToRecipients()
{
FB.ui({method: 'apprequests',
message: 'You have just received a PP request.',
to: '100000526845569'
}, requestCallback);
}
sendRequestToRecipineds();
ポップアップが開くと、次のエラーが表示されます。An error occurred. Please try later
ポップアップのリクエスト URL を見ると、次のように表示されます。
一部の情報が送信されていないと思います:
api_key, app_id
どうして?何か案は?
Facebookでのログインは完全に機能します。マルチフレンドセレクターも。
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : 'MYAPPID', // App ID from the App Dashboard
channelUrl : '//mydomain.com/channel.html', // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true, // parse XFBML tags on this page?
frictionlessRequests: true
});
};
// Load the SDK's source Asynchronously
(function(d, debug){
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" + (debug ? "/debug" : "") + ".js";
ref.parentNode.insertBefore(js, ref);
}(document, /*debug*/ false));
function sendRequestToRecipients() {
FB.ui({method: 'apprequests',
message: 'You have just received a PP request.',
to: '100000143396036'
}, requestCallback);
}
function sendRequestViaMultiFriendSelector() {
FB.ui({method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
}
function requestCallback(response) {
// Handle callback here
}
</script>
それがここでの作り方です