AS3的Facebook帆布应用程序 - 必须张贴图片的朋友的进给(墙) - 能不能做到? [英] AS3 Facebook canvas app - need to post image to friend's feed (wall) - can it be done?

查看:149
本文介绍了AS3的Facebook帆布应用程序 - 必须张贴图片的朋友的进给(墙) - 能不能做到?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Facebook应用程序的画布,写在AS3和使用Adobe Facebook的API。

I have a Facebook canvas app, written in AS3, and using the Adobe Facebook API.

我可以连接,获取好友列表,选择一个朋友,所有的东西是工作的罚款。问题是,当我尝试发布到朋友的墙上。我想张贴图片。就是这样,只是一个形象。

I can connect, get a list of friends, pick a friend, all that stuff is working fine. The problem is when I try and post to a friend's wall. I am trying to post an image. That's it, just an image.

图片为200×200,可满足不比50×50和外部的3小的Facebook的guidlines:1的比例

The image is 200x200, which meets the facebook guidlines of not being smaller than 50x50 and outside of a 3:1 ratio.

我已经找遍了所有在interwebz的答案,并已经尝试了所有的例子我能找到。我已经拼凑看起来像是有前途的尝试,只为有图像仍然没有露面。其他信息,如邮件,链接等,确实显示了,如果我有它。只是没有图片。这里是code,看起来最有前途的依据是什么Facebook的文档说。

I have searched all over the interwebz for an answer and have tried all examples I can find. I have cobbled together what looked like promising attempts, only to have the image still not show up. Other info, like the message, link etc, do show up if I include it. Just no picture. Here is the code that looked the most promising based on what facebook docs say.

Facebook.api('/' + friendID  +'/feed', onPicPosted, {image:imageToPost, message:messageToPost, fileName:'FILE_NAME'}, URLRequestMethod.POST);

friendID 是所选择的朋友, imageToPost 是一个位图, onPicPosted 是回调,它返回成功,即使图像不显示出来。

friendID is the selected friend, imageToPost is a bitmap, onPicPosted is the callback, which returns successful, even though the image does not show up.

我自己也尝试根据别人的建议,一个微小的变化,改变的图片图片在params对象。

I have also tried a slight variation based on someone's suggestion, changing image to picture in the params object.

Facebook.api('/' + friendID  +'/feed', onPicPosted, {picture:imageToPost, message:messageToPost, fileName:'FILE_NAME'}, URLRequestMethod.POST);

权限已被正确地请求和授予(publish_stream,也user_photos'和'friends_photos只是为了安全的措施)。

permissions have been properly requested and granted ('publish_stream', and also 'user_photos' and 'friends_photos' just for safe measure).

这个问题推迟交货,因此是急我摸不着头脑。如果任何人有关于如何完成发布的图像(位图,在Flash创建的)到所选择的朋友墙的想法,请大家帮忙!谢谢!

This issue is delaying a delivery so it is urgent I figure this out. If anyone has an idea of how to accomplish posting an image (bitmap, created in flash) to a selected friend's wall, please help! Thanks!

推荐答案

在一些调查研究:

这是不可能的。 图片是不是一个属性预期,而图片是,和图片需要一个URL作为它的值不是一个位图。

This is not possible. image is not a property expected, rather picture is, and picture expects a url as its value not a bitmap.

解决的办法是首先将图像上传到通过PHP的服务器,然后张贴图像与返回的URL。

The solution was to first upload the image to a server via php, then post the image with the returned url.

此外,作为一个侧面说明,通过一个应用程序发布到朋友的墙上的图像不能超过90x90大。如果发布到用户自己的壁,而不是在用户的好友的壁也可以是产生大于

Also, as a side note, an image posted to a friend's wall via an app can be no larger than 90x90. It can be larger than that if posted to the user's own wall, but not to the user's friends' walls.

这篇关于AS3的Facebook帆布应用程序 - 必须张贴图片的朋友的进给(墙) - 能不能做到?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆