【问题标题】:Android Sharing Photo and Text together using ShareOpenGraphObjectAndroid 使用 ShareOpenGraphObject 一起共享照片和文本
【发布时间】:2015-06-02 03:27:04
【问题描述】:

我正在尝试通过我的 android 应用程序将图像和文本一起发布,但共享对话框出现并禁用发布链接,甚至窗口在几秒钟后自行消失并出现错误:无法为用户生成预览......我的代码有问题?

SharePhoto photo1 = new SharePhoto.Builder()
                .setBitmap(bi)
                .setImageUrl(Uri.parse(recUrl))
                .build();

        ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
                .putString("og:type", "healthsynergy.photo")
                .putString("og:title", "food")
                .putString("og:description", "This is a wonderful food.")
                .putPhoto("og:image",photo1)
                .build();


        ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
                .setActionType("healthsynergy.publish_actions")
                .putObject("photo", object)
                .build();
        ShareOpenGraphContent content1 = new ShareOpenGraphContent.Builder()
                .setPreviewPropertyName("photo")
                .setAction(action)
                .build();


        shareDialog.show(content1);

【问题讨论】:

    标签: android facebook-graph-api facebook-opengraph facebook-sdk-4.0


    【解决方案1】:

    似乎不可能在没有设置“图像”的情况下发布 OG 动作,即使您在共享对象中有图像。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-13
      • 2020-06-04
      • 1970-01-01
      • 2012-08-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多