Support » Plugins » [Plugin: Simple Facebook Connect] A few questions

  • Thanks for this amazing plugin.
    3 questions :
    1. When you hover the link to share a link on Facebook, the “F” of the image disappears :
    See this article for example (click on partager)
    Do you know why and how I could fix it ?
    2. How could I change the read post to a share link, even by editing the code ? For me the “read post” seems useless, as the user can directly click on the link shared.
    3. Apparently your plugin adds a meta description with the entire content of the post (well or the excerpt if it’s used) … But you know that some plugins are managing the meta, like All in One SEO Pack, and that meta description should not be over a certain limit.
    Can’t I disable this ? (I have 2 meta in my source code now..). Have a look below.


Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    1. That probably has to do with your a:hover rules in the stylesheet. You’ll need to remove/modify them to prevent that background image from disappearing.

    2. In SFC-Publish, there’s two places where that read post code is. Change them both to this:

    // Share link
    $action_links[0]['text'] = 'Share';
    $action_links[0]['href'] = ''.urlencode($permalink);

    3. It always uses the excerpt actually, and no, I’m not going to change that. Stop using the All-In-One SEO plugin to eliminate the duplicate descriptions. The description is necessary for the Share functionality to work properly, it’s the only way for the plugin to control the content sent to Facebook.

    Woaw, thanks for your amazing help.

    For the 3rd one, what I wanted to say is that if you don’t have any excerpt, the meta description will take all the content of the post, which makes the meta description longer that what’s adviced by all the SEO manuals (around 200 letters)

    How could I limit it to a defined number of letters ?


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    No, it does not use the whole content of the post. It uses the excerpt, like I said.

    If there is no excerpt, WordPress generates one. That excerpt is NOT the complete content of the post, unless your post is incredibly short.

    I’ve never heard of any so-called “200 letter” thing. Sounds like a pile of crap to me. Never trust anybody who claims to know “SEO”.

    In generating the excerpt, WordPress takes the first 55 words. That’s an appropriate amount for the description, and that is about how much you want to go onto Facebook as part of the share to begin with.


    But have a look, it does take all the words into account.
    Example here

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    This is because you have some other plugin or theme interfering or something. By default, WordPress generates a shorter excerpt, and SFC uses whatever WP returns for that excerpt. If something else is modifying that, then you need to address the issue with that something else.


    Indeed, I have this in my functions.php

    function improved_trim_excerpt($text) {
    	global $post;
    	if ( '' == $text ) {
    		$text = get_the_content('');
    		$text = apply_filters('the_content', $text);
    		$text = str_replace(']]>', ']]>', $text);
    		$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);
    		$text = strip_tags($text, '<p>');
    		$excerpt_length = 60;
    		$thepermalink = get_permalink();
    		$words = explode(' ', $text, $excerpt_length + 1);
    if (is_home()||is_feed()) {
    if (count($words)> $excerpt_length) {
    			array_push($words, '<a href="'.$thepermalink.'">[...]</a>');
    			$text = implode(' ', $words);
    	return $text;
    remove_filter('get_the_excerpt', 'wp_trim_excerpt');
    add_filter('get_the_excerpt', 'improved_trim_excerpt');

    But I don’t get why the plugin doesn’t use the get_the_excerpt. What could I do to make sure that the meta description is right and does not include all the content in your plugin ?

    I’ve removed all the code above, disabled various plugins, and now I have a correct meta description
    BUT I still have one big issue : the content that is sent either via your plugin or directly if I share a link of my website on my wall is the full content ????

    How is it possible ??


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Yes, it uses the full content to send in the Publish plugin. The meta description is only used for the Share plugin. Not every one of the Facebook plugins works in the same way.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Also, it *does* use get_the_excerpt for the meta description. However, the publish plugin does not, because it has to do more work on making the content suitable for Facebook. Certain things in the HTML have to be filtered out and so forth.

    In short, it is trying to send your content to Facebook. That’s the whole point of it. If you want it to do something else, then I suggest modifying the plugin to do what you want. I’m satisfied with its method of operation and frankly don’t think it needs to change any further.

    Basically, you’re wanting the plugin to do something that it does not do. Well, I’m sorry, but it doesn’t do that. Use another plugin if you don’t like how this one operates.

    There’s some misunderstanding.
    I’m really really really glad of what this plugin does, especially the publish one 🙂

    I’m just concerned with the share button, that seems (but not all the time) to have problems with some of my short meta description.
    I would like to know what breaks sometimes, even with a short description.

    My question was just about that, and I would like to stress out again that I’m extremely happy with the work you’re doing for this plugin !

    See with this article for example :

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    The share functionality of Facebook gets the contents of the meta description. This has nothing to do with the plugin at all.

    But, it doesn’t get that content every single time you click share. If you just recently changed things, Facebook might have your information cached on their servers. So you wouldn’t expect to see an immediate change unless it was on a brand new post or something like that.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Simple Facebook Connect] A few questions’ is closed to new replies.