【问题标题】:how to post image on facebook in android?如何在android中的facebook上发布图像?
【发布时间】:2013-06-05 14:56:47
【问题描述】:

我有一个整数数组,其中有来自可绘制文件夹的图像。现在我想将该整数数组中的图像分享到 facebook wall。我尝试了下面的代码

    Uri imageuri  = Uri.parse("android.resource://" + "package name/" + mBitmapIds[int_image_position]);
    String filePath = imageuri.getEncodedPath();
    Bundle bundle=new Bundle();
    bundle.putString("picture", filePath);
    facebookConnector.getFacebook().request("me/feed", bundle, "POST");

其中 mBitmapIds 是 int 数组,但它没有将图像发布到墙上。谁能告诉我我该怎么做。提前致谢。

【问题讨论】:

  • 检查这个answer...它可能会有所帮助..

标签: android facebook image post


【解决方案1】:

尝试使用AsyncFacebookRunner

Bundle bundle = new Bundle();
bundle.putString("message", "picture caption");
bundle.putByteArray("picture", ImageBytes);
mAsyncRunner.request("me/photos", param, "POST", new SampleUploadListener());

也请参考Android post picture to Facebook wall

希望对你有帮助。

【讨论】:

  • 我们能否提及要出现在帖子缩略图中的图片大小
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多