[英]Facebook custom story, #100 Object Missing a Required Value… property 'appnamespace:prop' of type 'string' was not provided."
For a Custom Story, using user-owned objects (no URL for FB to parse) I defined the custom properties yet I get an error #100... 对于自定义故事,使用用户拥有的对象(没有用于FB解析的URL),我定义了自定义属性,但出现错误#100 ...
here's the code: 这是代码:
FB.api(
'me/objects/appnamespace:CustomStory',
'post',
{ object:
{
"title": "story title",
"t_name":"watching FOX news",
"main_a": "custom prop 1",
"main_b": "custom prop 2",
"description": "test post tracked trigger"
}
},
function(response) {
console.log(response);
}
);
error says appnamespace:CustomStory property main_a not defined which is odd because it's right there... 错误说appnamespace:CustomStory属性main_a未定义,这很奇怪,因为它就在那里...
thanks in advance for ideas... 预先感谢您的想法...
oh.... so the fix is to enclose custom properties in a "data" property that holds an Object ala: 哦....所以解决方法是将自定义属性包含在保存有Object ala的“数据”属性中:
FB.api(
'me/objects/appnamespace:CustomStory',
'post',
{ object:
{"title": "storty title",
"data": { // put custom property values here
"main_a": "value 1",
"main_b": "value 2",
"t_name": "another property"
},
"description": "test post tracked trigger"
}
},
function(response) {
console.log(response);
}
);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.