WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Simple Facebook Connect] A few questions (12 posts)

  1. enseignement
    Member
    Posted 4 years ago #

    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.

    Thanks

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

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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'] = 'http://www.facebook.com/share.php?u='.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.

  3. enseignement
    Member
    Posted 4 years ago #

    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 ?

    Thanks,

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

  5. enseignement
    Member
    Posted 4 years ago #

    Thanks,

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

  6. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

  7. enseignement
    Member
    Posted 4 years ago #

    Hello,

    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_pop($words);
    			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 ?

  8. enseignement
    Member
    Posted 4 years ago #

    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 ??

    Benjamin

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

  10. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

  11. enseignement
    Member
    Posted 4 years ago #

    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 : http://www.enseignons.be/actualites/2010/05/31/usage-tic-enseignement-awt/

  12. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic