WordPress.org

Ready to get started?Download WordPress

Forums

Simple Facebook Connect
[resolved] Description is adding Tweet Tweet to the text (13 posts)

  1. nicoleb
    Member
    Posted 2 years ago #

    I recently upgraded the Simple Facebook Connect. Now, whenever I publish a post, the description is prepended with the words Tweet Tweet. This occurs even if I don't use the auto publish but take the URL and post it directly anywhere.

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

  2. zvhipp
    Member
    Posted 2 years ago #

    I am also getting this but this was caused due to sharebar twitter button. Just go to sharebar if you are using it, and edit twitter button and remove text Twitter from it.

  3. nicoleb
    Member
    Posted 2 years ago #

    OH THANK YOU! That's what it was!

  4. Daniel J. Lewis
    Member
    Posted 2 years ago #

    That's not a fix, that's a workaround. Having the word "Tweet" in the tweet button is very important for accessibility.

    This problem is actually amplified if you have any other social buttons, like +1, Stumbleupon, and even Facebook buttons.

    The real problem is that SFC is pulling the og:description tag from the _content_ of the page, not the written excerpt, as its documentation makes it seem.

  5. Daniel J. Lewis
    Member
    Posted 2 years ago #

    nicoleb, can you mark this unresolved? zvhipp's suggestion is nice, but it doesn't fix the real problem.

    I'd rather not start a duplicate post on this issue.

  6. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    No, SFC 1.2 does pull from the manually created excerpt, if one is available and non-empty on the post.

    See the sfc_base_make_excerpt() function in sfc-base.php.

  7. Daniel J. Lewis
    Member
    Posted 2 years ago #

    Thanks for popping in here, Otto. If SFC is really pulling from the excerpt, then how is it capturing stuff like ShareBar from the post? Sharebar doesn't appear in the excerpt or even on the front page where the excerpts would be listed. Sharebar is only within the post.

  8. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    Try the fix I just put in the development version, see if that improves the handling there.

  9. Daniel J. Lewis
    Member
    Posted 2 years ago #

    Thanks for that. It fixed the problem with ShareBar, but it's still grabbing text that shouldn't be there. This time, it's grabbing the PowerPress podcasting plugin text.

    <meta property='og:description' content='Podcast: Play in new window | Download ACTUAL EXCERPT HERE.' />

    Perhaps SFC is pulling from the_excerpt too late in the filter chain?

  10. nicoleb
    Member
    Posted 2 years ago #

    I've also noted that it will pull extra text from plugins that add content to the end of a post if my description is not long enough to take up the full amount of characters. Known plugins it does this with include WP-About The Author and Call to Action

  11. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 2 years ago #

    Edit: Never mind, I was confused about what you were saying there.

    Yes, if a plugin puts stuff into the content using the_content or the_excerpt, then that will be reflected there too. This is intended, that stuff is part of the content.

    If you don't want that sort of thing, then core development is still needed to have filters outside of the content. There's a trac ticket for this, but the fact is that if a plugin is modifying the content, then SFC/STC/SGC should be picking that up too. That's intended.

  12. Daniel J. Lewis
    Member
    Posted 2 years ago #

    Coming back to this, perhaps the ultimate solution would be to grab from the meta description. Doesn't WordPress automatically populate that from the excerpt?

    Pulling from the meta description tag would also be great because it would allow us to write descriptions in ways that appeal outside of the context of our site. This is normal for SEO, but would be fantastic for social sharing.

  13. jdemeza
    Member
    Posted 1 year ago #

    I know that it isn't good practice to modify plugins because your changes are at risk of being removed if the plugin is updated. Having said that, I changed the 'sharebar_auto' function in sharebar.php so that the the excerpt does not get modified.

    function sharebar_auto($content){
    	// Don't do anything for the excerpt
    	if ( in_array ( 'get_the_excerpt', $GLOBALS['wp_current_filter'] ) )
    		return $content;
    
    	if((get_option('sharebar_auto_posts') && is_single()) || (get_option('sharebar_auto_pages') && is_page())){ $str = sharebar(false); $str .= sharebar_horizontal(false); }
    	$newcontent = $str.$content;
    	return $newcontent;
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic