Support » Plugin: Simple Facebook Connect » [Plugin: Simple Facebook Connect] Line breaks when crossposting to Facebook

  • Resolved Piotr Bratzki


    (Hope i don’t double post)


    I would like to crosspost Haiku Poems from WordPress to Facebook
    which require line breaks. Example:

    Bla blabla blabla
    Blabla blablabla blabla blabla
    blabla bla blabla

    Is there a way to transport the line break info from the blog to the facebook link, or to directly post it as a status including line break? (There is a way of posting line breaks in FB by using the Shift+Return keys, that’s all i know..)

    I am not skilled in programming but can put in code pieces if someone tells me how and where – or can someone spot the point, why a blogpost’s line break format is erased during transport?

    Any ideas are very welcome!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Samuel Wood (Otto)

    (@otto42) Admin

    Facebook doesn’t allow line breaks in that description field. If you put them in, it strips them out.

    There is a really hacky way to do it using <center></center> instead to force a line break, but it’s kind of a hack and so I don’t recommend it.

    Still, sfc-base, line 444, you can change this:

    $text = str_replace(array("\r\n","\r","\n"),' ',$text);

    to this:

    $text = str_replace(array("\r\n","\r","\n"),'<center></center>',$text);

    If you want to try it. I do not recommend it. Unforeseen weird may occur.

    Thank you, otto – after i messed it up by writing the code
    from the email note (which differs from the one here) it
    successfully posts the linebreaks, and erases all other formats.

    very very good – thank you !!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Line breaks when crossposting to Facebook’ is closed to new replies.