2012-08-23 173 views
0

我真的需要在Facebook墙贴的描述中添加一个换行符。有一个使用<center></center>标签的黑客,但它不再工作。我使用Facebook的API为Android:在Facebook墙贴的描述中换行

public Bundle createFacebookMsg() { 
    Bundle params = new Bundle(); 
    ... 
    params.putString("description", "my custom string with LINE BREAKS"); 

    // does not work any more 
    // params.putString("description", "line1<center></center>line2"); 

    ... 
    return params; 
} 
+0

他们必须禁用它是有原因的,但它肯定烦。现在任何确实找到方法的人都会毫不犹豫地公开! – Kevin

回答

-1

这为我工作:

StringBuilder messageData = new StringBuilder(title).append('\n') 
    .append('\n').append(message).append('\n').append('\n') 
    .append(description); 
// Message 
postParams.putString("message", messageData.toString());