gpt4 book ai didi

java - Facebook Messenger Android Sdk 共享 setExternalUri

转载 作者:太空宇宙 更新时间:2023-11-04 13:58:53 26 4
gpt4 key购买 nike

我有两个类似的 URI。

Uri uri = Uri.parse("android.resource://"+activity.getPackageName() +"/"+ R.drawable.tree);
Uri exuri = Uri.parse("https://cdn.xxx.com/slider/xxx.png");

我使用 Facebook SDK 设置它们;

ShareToMessengerParams shareToMessengerParams =
ShareToMessengerParams.newBuilder(uri, "image/png").setExternalUri(exuri)
.setMetaData("{ \"image\" : \"trees\" }")
.build();

但是第一个 URI 是必需的,因此我无法共享 externalURI,无论如何它总是共享第一个 URI。有什么想法吗?

最佳答案

extends url指定的内容必须与url指定的内容完全相同。我在Android Facebook SDK源代码中找到了它。

An external URI that Messenger can use to download the content on Facebook's servers instead of requiring the Messenger application to upload the content. The content returned by the this URI must be exactly the same as the content specified by {@link #uri}. If the content is different, Messenger may fail to send the content. See <a href="https://developers.facebook.com/docs/messenger/android">developer docs</a> for more info.

关于java - Facebook Messenger Android Sdk 共享 setExternalUri,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29516340/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com