Support » Plugin: Facebook Page Publish » Fix for "read more" comment tags in Facebook Page Publish

  • Resolved tbjers

    (@tbjers)


    This may have something to do with how my more tag is inline amongst some other HTML, but in either case, here’s a quick fix to ensure that these do not end up posted to Facebook and that the text is cut at the right position:

    Replace:

    // Facebook link description allows max. 420 characters:
    if (strlen($message) >= 420) {
    $last_space_pos = strrpos(substr($message, 0, 417), ' ');
    $message = substr($message, 0, $last_space_pos).'...';
    }

    With the following:


    // Facebook link description allows max. 420 characters:
    if (strpos($message, '<!--more-->') !== false) {
    $message = substr($message, 0, strpos($message, '<!--more-->'));
    }
    if (strlen($message) >= 420) {
    $last_space_pos = strrpos(substr($message, 0, 417), ' ');
    $message = substr($message, 0, $last_space_pos).'...';
    }

    http://wordpress.org/extend/plugins/facebook-page-publish/

Viewing 1 replies (of 1 total)
  • Plugin Author mtschirs

    (@mtschirs)

    Hi tbjers,

    I totally neglected these. Thank you very much for the fix, I will integrate it into the next update (today or tomorrow).

Viewing 1 replies (of 1 total)
  • The topic ‘Fix for "read more" comment tags in Facebook Page Publish’ is closed to new replies.