无法通过Android的分享意图的链接共享文本 [英] Unable to share text with a link through Android Share Intent

查看:153
本文介绍了无法通过Android的分享意图的链接共享文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我想用以下链接共享文本是我的code

now i want to share text with a link below is my code

String myText = "Hey!\nThis is a my Text!";

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("text/plain");
String extraText = "www.mylink.com\n\n" + myText ;
share.putExtra(Intent.EXTRA_TEXT, extraText);
startActivity(Intent.createChooser(share, "Share with Friends"));

所以它的工作做工精细与Gmail,微博等,但它不工作在Facebook

so it work work fine with gmail, twitter etc. but it is not working on facebook

在Facebook上分享它唯一的联系,但有没有显示我的文字

我想这种类型的共享

www.mylink.com

here is my text

任何帮助将是AP preciated, 在此先感谢。

Any help would be appreciated, Thanks in Advance.

推荐答案

你有这里的问题可能是Facebook的不看的意图提供的额外信息不会。因为它适用于Gmail和Twitter的。

The problem you have here is probably that Facebook doesn't look at the extra information provided in the Intent. Because it works for Gmail and Twitter.

看一看的Andr​​oid和Facebook的方式分享意图 ..

这篇关于无法通过Android的分享意图的链接共享文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆