我在The Sims Social应用程序中看到请求对话框中的一个复选框选项,它显示:“发送模拟社交请求前不要问<USER>“。请求对话框复选框选项“请不要在发送之前询问...”
我还没有在Facebook API Docs上找到这个功能,我想知道如何在我的应用上启用它。
我在The Sims Social应用程序中看到请求对话框中的一个复选框选项,它显示:“发送模拟社交请求前不要问<USER>“。请求对话框复选框选项“请不要在发送之前询问...”
我还没有在Facebook API Docs上找到这个功能,我想知道如何在我的应用上启用它。
弗拉维亚
参考http://developers.facebook.com/docs/plugins/registration/#custom_fields 您应该可以指定要包括任何自定义字段。
{"name":"the-name", "description": "the-description", "type": "option-type"}
或if选项。
{"name":"the-name", "description": "the-description", "type": "option-type", "options": {"name":"value","name":"value"}}
<fb:registration redirect-uri="https://developers.facebook.com/tools/echo"
fields='[
{"name":"name"},
{"name":"foo","description":"Type foo","type":"text"},
{"name":"bar","description":"Type bar","type":"text"},
{"name":"facebooker","description":"Pick Paul","type":"select","options": {"coder":"Paul","pm":"Austin","partners":"Cat"}}]'
onvalidate="validate"></fb:registration>
此功能是最有可能的,他们在内部使用,以知道用户是否愿意接收应用程序生成的请求,而不是一个网站实现的一些功能的标志。有关应用程序生成的请求的详细信息,请浏览:http://developers.facebook.com/docs/channels/#requests
你可能会感到震惊,但加入
布局:“IFRAME”
到其中的FB.ui请求作为PARAM应该解决您的问题。 FB对话框将显示您想要的复选框。
FB.ui(
{
method: "apprequests",
filters: ["app_non_users"],
layout: "iframe",
data: "invite",
title: heading,
message: text,
picture: pictureUrl,
caption: text
},
function(response) {
if (response && response.request_ids) {
// the user has successfuly carried out the action
fbHandleResponse(response);
} else {
// user cancelled the action
fbHandleFailure();
}
}
);
干杯! 的Jakub
集frictionlessRequests为真正将这样做。
FB.init({
appId : 'YOUR_APP_ID',
status : true,
cookie : true,
frictionlessRequests : true,
oauth: true
});