gpt4 book ai didi

android - 在 android 中使用 intent 分享到 facebook

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:52:03 33 4
gpt4 key购买 nike

我使用下面的代码来分享内容

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "The status update text");
startActivity(Intent.createChooser(intent, "Dialog title text"));

电子邮件、短信和除 Facebook 之外的任何内容都可以。我谷歌了原因,它似乎是 facebook 自 4 月以来的一个错误,但不幸的是没有人修复它。

但是,我发现很多应用程序仍然可以使用 Intent 选择器来成功调用 Facebook,例如 Google 阅读器。他们怎么做到的?

据我所知,我们可以使用 Facebook API,但他们如何知道用户在选择器中选择 facebook 并调用 facebook API?

最佳答案

根据错误跟踪器的最新更新,这是“设计使然”,错误已被关闭。 https://developers.facebook.com/bugs/332619626816423/

所以看起来这不可能通过 intents 实现..

关于android - 在 android 中使用 intent 分享到 facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8651249/

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