<br> not working with facebook
I'm trying to post a result on user's wall using the following code
$attachment = array(
'name' => "#1<br>". $result[1]['name'].
"#2<br>".$result[2]['name'].
"#3<br>".$result[3]['name'].
"#4<br>".$result[4]['name'].
"#5".$开发者_StackOverflow中文版result[5]['name'],
'link' => FACEBOOK_CANVAS_URL,
'description' => "",
'picture'=> FACEBOOK_CANVAS_URL_SO."/",
'actions' => json_encode(array('name' => 'test','link' => FACEBOOK_CANVAS_URL)));
$results=$facebook->api('/'.$uid.'/feed', 'POST', $attachment);
I'm getting this output
#1 User1#2 User2#3 User3
But I want this output
#1 User1
#2 User2
#3 User3
I also tried \n, which didn't work as well
Has facebook disabled those tags?
Help Pls
facebook has obsoleted < br > tag in arrays. so it doesn't work
Try This....
$attachment = array(
'name' => "#1". $result[1]['name']."<br/>".
"#2".$result[2]['name']."<br/>".
"#3".$result[3]['name']."<br/>".
"#4".$result[4]['name']."<br/>".
"#5".$result[5]['name']."<br/>",
'link' => FACEBOOK_CANVAS_URL,
'description' => "",
'picture'=> FACEBOOK_CANVAS_URL_SO."/",
'actions' => json_encode(array('name' => 'test','link' => FACEBOOK_CANVAS_URL)));
$results=$facebook->api('/'.$uid.'/feed', 'POST', $attachment);
None of these options seem to work.
Try:
<br />
It should work like this!
EDIT:
Just in case, I assumed <br>
is not working at all but I if you want a line in between you should do:
<br /><br />
EDIT:
Try this too:
</b>
Try it like this too:
<b>This should line break</b>
<b>This should line break</b>
精彩评论