发布图片墙的机器人机器人、图片

2023-09-06 17:00:49 作者:她是他梦他是我命

我要发布图片在墙上,就像我可以从Facebook的网页做的。

I want to post a picture to the wall, just like what I can do from the facebook web page.

我已经试过这两种方式,但两者不是我想要的。

I've tried these two ways, but both not what I want.

[Android帖子的图片至Facebook墙上] 这一次只是上传图片到图片库,就会出现在墙壁上的消息,但它实际上并不是一个职位。多张照片将放在同一个消息。 [Android如何上传图片朋友的墙上用facebook Android SDK中] 这一个职位到墙上,链接的图片。但它看起来像共享一个链接,画面是如此之小。 [ Android post picture to Facebook wall ] This one just upload pictures to the photo gallery, there will be a message on the wall, but it's not actually a post. Multiple pictures will be put in the same message. [ Android how to post picture to friend's wall with facebook android sdk ] This one post to the wall, with link to the picture. But it looks like sharing a link, the picture is so small.

是否有可能做出的墙后用图片(从手机的文件,而不是URL)?

Is it possible to make a wall post with a picture (a file from the phone, not URL)?

它看起来像我张贴的上传照片在Facebook网站上。

Which looks like I posted from the "Upload Photo" on facebook website.

https://m.xsw88.com/allimgs/daicuo/20230906/3065.png (抱歉,我不能张贴图片)

https://m.xsw88.com/allimgs/daicuo/20230906/3065.png (sorry I can't post image)

谢谢!

推荐答案

在第一线接受的答案是正确的,只有一个变化,你看,当你上传图片在Facebook上,就像你添加的屏幕捕获,你张贴标题为特定的专辑墙照片。

The accepted answer in the 1st thread is correct, with just one change, you see when you upload a picture in facebook, like in the screen capture you added, you post it to a specific album titled "Wall Photos".

在这个问题的答案,他们所使用的我/照片的,这将创建一个相册的应用程序(如果尚未存在),并上传图像那里。

In that answer they used me/photos, and that will create an album for the app (if one isn't already existing) and post the image there.

我想,这应该工作:

Bundle params = new Bundle();
params.putByteArray("source", imageBytes);
params.putString("message", "A wall picture");
facebook.request("me/feed", params, "POST");

(你可以明显地使用异步亚军)

(you can obviously use the async runner)

如果不工作,那么你就必须获得的登录用户的墙上的照片相册ID,然后再像做:

If that does not work, then you'll have to get the "wall photos" album id of the logged in user first and then do something like:

Bundle params = new Bundle();
params.putByteArray("source", imageBytes);
params.putString("message", "A wall picture");
facebook.request("ALBUM_ID/photos", params, "POST");