开发者

ActionScript Graph API: Posting Image To Facebook User Profile fails with Stream Error

开发者 https://www.devze.com 2023-03-26 06:22 出处:网络
I am trying to post an image to my own profile using the ActionScript SDK. I have verified that i have the publish_stream and user_photos permissions.

I am trying to post an image to my own profile using the ActionScript SDK.

I have verified that i have the publish_stream and user_photos permissions.

I am logged in and can read Albums and Images.

Using this code:

var bitmap:Bitmap = new Bitmap(bitmapData);
var request:Object = new Object();
request.access_token = Facebook.getSession().accessToken;
req开发者_运维知识库uest.message = "my message";
request.image = bitmap;
request.fileName = "filename.jpg";
meFacebook.api("/me/photos", postImageToUserCallback, request, URLRequestMethod.POST);

i always see the request failing with a

Error #2032: Stream Error. URL: https://graph.facebook.com/me/photos

I am totally stuck here. What could be the problem and how can i debug this the best way?

Thanks!


I do this without issue, but with a couple of differences which may or may not make a difference:

Facebook.api(albumID+"/photos",onImagePost,{message:"",image:new Bitmap(myBmd), fileName:''},URLRequestMethod.POST);
  1. I use Facebook.api. What does your meFacebook wrapper do?
  2. I use an album ID rather than me
  3. fileName is an empty string.


I had the exact same error below and it turned out that a link in the "message" parameter was causing the issue.

Error #2032: Stream Error. URL: https://graph.facebook.com/me/photos

We were using a vanity URL (from tinyurl) in the message body. After trying just about everything else, I removed the vanity URL and replaced it with the actual URL and the photo posted with no issues.

And I have no problem creating an album for the app. Facebook automatically creates one if it doesn't exist.

I am using ver 1.8.1 SWC from http://code.google.com/p/facebook-actionscript-api/

This is the code I am using:

var params : Object = {image:bitmap, 'My Message https://www.facebook.com/client?sk=app_##########', fileName:'my_filename.jpg'};
Facebook.api('me/photos', onSaveToPhotoAlbumComplete, params);
0

精彩评论

暂无评论...
验证码 换一张
取 消