[英]plus is getting placed instead of space while posting text on twitter
我正在使用以下代碼在Twitter上發布字符串,但沒有空格,而是將其放置在發布的字符串中。 我該如何解決這個問題?
Intent inte = new Intent(
Intent.ACTION_VIEW,
Uri.parse("https://mobile.twitter.com/compose/tweet?status="
+ "La Mar Cebicheria"+ " " + sharepath));
startActivity(inte);
mpopup.dismiss();
下面是我的文字看起來的圖片
Uri.parse方法采用符合RFC-2396的編碼字符串。 以這種格式, 空格字符被編碼為加號 。
要獲取格式正確的URL,您應該執行以下操作:
URI uri = new URI("http", "https://mobile.twitter.com/compose/tweet?status="
+ "La Mar Cebicheria"+ " " + sharepath, null);
URL url = uri.toURL();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.