我正在尝试使用图形API将带有图像的文本发布到Facebook墙上。
我正在为此使用以下代码段。
var body = {
message : 'this is a test message',
image : 'http://someurltoimage.png'
};
FB.api(
"/me/feed",
"POST",
{
"object": {
"message": body.message,
"picture": body.image
}
},
function (response) {
if (response && !response.error) {
//process when success
}
}
);
但是我得到以下错误代码。
error: Object
code: 100
error_subcode: 1349125
message: "Invalid parameter"
type: "FacebookApiException"
没有针对此错误的文档。
任何建议将不胜感激。
“我正在尝试使用图形API将带有图像的文本发布到Facebook墙上。”
/feed
,要上传必须使用通话的照片/photos
object
Facebook发送包含参数的无效参数,API不知道您的参数Object
是object
(我知道object
这里的s太多了,换句话说,您是在对象内发送对象要解决所有这些问题,请将替换为me/feed
,me/photos
并将第3个参数(您的对象)替换为body
var body = {
message : 'this is a test message',
url: 'http://someurltoimage.png'
};
FB.api("/me/photos",
"POST",
body,
function (response) {
if (response && !response.error) {
//process when success
}
}
);
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句