[英]Facebook API 100 Error
嘗試在Feed上發布時收到此錯誤。 我正在使用JavaScript發布。 ByteArray數據來自.swf
API錯誤代碼:100
API錯誤說明:參數無效
錯誤消息:圖片URL格式不正確
這是我的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
});
}
我正在向其發送字節數據數組。 可以使用它來使其正常工作還是我需要一個URL? 我的問題是我正在拍照,將數據的字節數組發送到表單,然后嘗試使用該圖片..沒有直接鏈接。
有什么想法嗎?
您需要首先通過Graph API上傳圖像,例如,如下所述:
https://developers.facebook.com/docs/graph-api/reference/user/photos/#publish
這意味着通過對/{user_id}/photos
的POST請求將其作為multipart / form-data mime-type,並將byteArray作為源參數。
請記住,您需要publish_actions
權限才能執行此操作!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.