WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
[resolved] Text length on Facebook (3 posts)

  1. mdatawt
    Member
    Posted 2 years ago #

    Hello,

    At first thanks for this well working plugin.

    I have a question about the part of the post that lands on Facebook : is there a way to fix its length somewhere ?

    I have noticed that the text displayed on Facebook has a very often changing length, and since today it's nearly my whole post which appears on Facebook.

    My posts don't have an excerpt themselves on my site.

    What would you suggest to do to put just a short text ? (approx 200 caracters for example)

    Thanks a lot in advance

    Best regards

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    By default (and by popular demand), SFC's publisher tries to make the maximum "excerpt" that FB will take. This is 1000 characters. It does some smart trimming to not cut words in half and such.

    To change this, I made a filter you can use in your theme's functions.php file (or somewhere else if appropriate). You can use it thusly:

    function my_excerpt_length($len) {
      return 200;
    }
    add_filter('sfc_excerpt_length','my_excerpt_length');

    Alternatively, if you fill in a manual excerpt, that gets used instead (and length restrictions still apply to that as well).

  3. mdatawt
    Member
    Posted 2 years ago #

    Thank you very much for your quick and detailed answer. I tried the manual excerpt and it works fine.

    Best regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic