Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

facebook sdk android wall post line break

I'm making an application that is posting some information to your facebook wall using facebook sdk for android. This works, but I can't seem to get new lines on the posts. I have tried \n but it doesent work. Any suggestions?

Here is my code:

Bundle parameters = new Bundle();

String temp = "";
for (int i = 0; i < mArrayAdapter.getCount(); i++){
            temp = temp + mArrayAdapter.getItem(i) + "\n"; // Not working
}

parameters.putString("message", temp);
mFacebook.dialog(this, "stream.publish", parameters, new DialogListener());  

Thanks,

James Ford

like image 292
James Ford Avatar asked Nov 15 '22 09:11

James Ford


2 Answers

Hi James i have tried that before, even with html code but i think thats not possible. The reason, Facebook must have a control to avoid blank spaces or line break on his posts.

like image 164
Jorgesys Avatar answered Dec 29 '22 14:12

Jorgesys


New lines are not allowed in stream posts (the fact that you may have seen them in the past are bugs on facebook).

like image 23
daaku Avatar answered Dec 29 '22 13:12

daaku