明确分享照片 Facebook

Explicitly shared photo facebook

是否可以将照片发送到 Facebook explicitly_shared false 并且不出现在用户的时间轴中?

SharePhoto photo = new SharePhoto.Builder()
        .setBitmap(image)
        .build();
SharePhotoContent content = new SharePhotoContent.Builder()
        .addPhoto(photo)
        .build();

或者也许...我在 open graph 中将一个故事发送到 facebook,但图像没有进入相册,这可能吗?

    ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
            .putString("fb:app_id", "app_id")
            .putString("og:type", "object_type")
            .putString("og:title", title())
            .putString("og:description", message)
            .putString("og:url", urlShare)
            .putString("og:image", imageUrl)
            .build();
    ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
            .setActionType("action_type")
            .putBoolean("fb:explicitly_shared", true)
            .putObject("object", object)
            .build();
    ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
            .setPreviewPropertyName("object")
            .setAction(action)
            .build();

    ShareApi.share(content, this);

“.putString("og:image", imageUrl)”中的图像转到故事和时间轴,但我也想在相册照片中使用相同的图像。怎么做?

是的,这就是您切换用户生成的方式:https://github.com/facebook/facebook-android-sdk/blob/f24dc751971af8d295add875b5e23221aded470f/facebook/src/com/facebook/share/model/SharePhoto.java#L151

看起来它已经默认为 false。如果你想直接使用图表 api,这里是文档:https://developers.facebook.com/docs/graph-api/reference/photo#Creating

如果你做一个OG分享,照片会进入应用相册,我不知道有什么方法可以禁用它。

我通过向 Facebook 发送两个请求解决了我的问题,一个是关于故事,另一个是将照片发送到相册,如果有人知道另一种方法只做一个请求就好了。