Facebook的API 100错误 [英] Facebook API 100 Error
问题描述
尝试后在进料时,已收到此错误。我使用JavaScript来发布。 的ByteArray数据从一个.swf未来
Been receiving this error when trying to post on a feed. I am using JavaScript to post. The ByteArray data is coming from a .swf
API错误code:100
API Error Code: 100
API错误说明:无效的参数
API Error Description: Invalid parameter
错误消息:图片网址的格式不正确。
Error Message: picture URL is not properly formatted
下面是我的AS3:
var bdToSave:BitmapData = new BitmapData(s.width, s.height);
bdToSave.draw(s, null, null, null, null, true);
var encoder:JPGEncoder = new JPGEncoder();
var byteArray:ByteArray = encoder.encode(bdToSave);
if (ExternalInterface.available) ExternalInterface.call("publishStream", byteArray);
下面是我的JS:
function publishStream(person)
{
FB.ui({
method : 'feed',
name: 'I just painted my face!',
caption: 'From the show Warren, using the True Colors: Face Painting App I painted my face to match my favourite team!',
link: 'https://www.facebook.com/fanunitednet',
description: '',
picture: person
});
}
我在发送数据的字节数组。是否有可能得到它的工作使用还是我需要一个网址?我的问题是,我拍照,发送数据的ByteArray的表格,然后尝试使用图片..没有直接的联系。
I am sending it a byte array of data. Is it possible to get it working using that or do I need a URL? My issue is that I'm taking a picture, sending the bytearray of data to the form and then trying to use that picture.. there is no direct link.
思考?
推荐答案
您需要通过图形API首先要上传的图片,例如像它的描述如下:
You need to upload the image via the Graph API first, for example like it's described here:
https://developers.facebook.com/docs /图-API /参考/用户/照片/#发布
这意味着通过一个POST请求 / {USER_ID} /照片
为的multipart / form-data的的MIME类型,和的字节数组作为源参数。
This mean via a POST request to /{user_id}/photos
as multipart/form-data mime-type, and the byteArray as source parameter.
请记住,你所需要的 publish_actions
许可才能够做到这一点!
Remember that you need the publish_actions
permission to be able to do this!
这篇关于Facebook的API 100错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!