开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜