开发者

URLEncoder.encode() have some problem with facebook in android

开发者 https://www.devze.com 2023-01-19 06:54 出处:网络
hi i am working on facebook app and when i am posting my message which is perfectly post but but space between two word which gives \'+\' sign sign.

hi i am working on facebook app and when i am posting my message which is perfectly post but but space between two word which gives '+' sign sign. eg:: Hello+Good+Morning.... so can any one tell me how to fix this please i am waiting.

public void postMessage() throws UnsupportedEncodingException
{   
  String posttext = "";     
  posttext = editText.getText().toString().trim();      
  AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(oauth);
  Bundle params = new Bundle();     
  params.putString("access_tok开发者_Python百科en", access_token);
  params.putString("message", URLEncoder.encode(posttext,"UTF-8"));     
  mAsyncRunner.request("me/feed", params, "POST", this);
}


Try putting %20 instead of space.

0

精彩评论

暂无评论...
验证码 换一张
取 消