WordPress.org

Ready to get started?Download WordPress

Forums

WP Facebook Open Graph protocol
Problem with description meta (17 posts)

  1. chtite_asu
    Member
    Posted 1 year ago #

    Hello,

    I just installed this plugin and have a problem with the description meta.
    It doesn't take the description put in all-in-one SEO pack, it puts the text of the article until there's no more space.
    How can I use the all-in-one SEO description to make it smaller please ?

    Thanks in advance for your reply.

    Angela

    Ps : You can find an example on my facebook page. The base Ball Bear article was made with your plugin and the other one's without plugin.
    http://www.facebook.com/Playofmedley

    http://wordpress.org/extend/plugins/wp-facebook-open-graph-protocol/

  2. wsusa
    Member
    Posted 1 year ago #

    im having the same problem.

    it would be nice to have a way to edit the og metas for each page or as a group. so far this plugin is a failure. not sure why it gets good reviews.

  3. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    descriptions are filtered through the normal system... if that plugin changed the way it does that then that's abnormal. I'd have to look specifically into that plugin and what he changed but every other seo meta plugin gets filtered as does this one. used to work fine... they must have changed something with their description.

    If I get some extra time I'll try and test with their plugin and see what they changed.

  4. mattkoltermann
    Member
    Posted 1 year ago #

    I'm having this same issue, too. The custom description I've provided through All-in-One SEO is not being inserted into og:description; instead it's a truncated first sentence or two from the post. Otherwise works perfectly. Thanks for your work on this plugin!

  5. OldGrumpyDE
    Member
    Posted 1 year ago #

    That problem stems from the regex used to locate the SEO description. I fixed it by changing the regex in function wpfbogp_callback() to actually work ;)

    $description = preg_match( '#<meta name="description" content="(.*)" />#', $content, $description_matches );

    and

    $content = preg_replace( '#<meta property="og:description" content="(.*)"/>#', '<meta property="og:description" content="' . $description_matches[1] . '"/>', $content );

  6. Athletica
    Member
    Posted 1 year ago #

    We have the same issue as well, but the strange thing is that it works fine on all posts, but not on the main page (huh?!)

  7. AxelPiskulic
    Member
    Posted 1 year ago #

    Hello,

    I have the same problem with All in One SEO Pack plugin. The code suggested by OldGrumpyDE not work for me.

    Thank you very much for any idea!

  8. AxelPiskulic
    Member
    Posted 1 year ago #

    Hello,

    This is not a solution but I "solved" the problem removing the following code from the wp-facebook-ogp.php archive:

    if ( is_singular() ) {
    	if ( has_excerpt( $post->ID ) ) {
    		$wpfbogp_description = strip_tags( get_the_excerpt( $post->ID ) );
    	} else {
    		$wpfbogp_description = str_replace( "\r\n", ' ' , substr( strip_tags( strip_shortcodes( $post->post_content ) ), 0, 160 ) );
    	}
    } else {
    	$wpfbogp_description = get_bloginfo( 'description' );
    }
    echo '<meta property="og:description" content="' . esc_attr( apply_filters( 'wpfbogp_description', $wpfbogp_description ) ) . '"/>' . "\n";

    This removes the "og description", but Facebook and Google+ will take it from the ordinary description provided by "All in One SEO Pack" plugin.

    Thank you very much for any idea... or a true solution!

  9. lee.sa
    Member
    Posted 1 year ago #

    Hi,

    I have the same problem with All in One SEO Pack.

    AxelPiskuic thanks for telling me about this thread.

    Unfortunately your code doesnt work for me. I dont see any changes if I hit the share button after the changes.

    Would be great if the plugin gets an update to fix this!
    If it wont get fixed I need to delete the plugin because I really need some good description meta because its a company page which would be sad...

  10. AxelPiskulic
    Member
    Posted 1 year ago #

    Hello lee.sa,

    Removing that piece of code actually removes the "og description", but Facebook has a cache with the information of your site. In few days you'll see the change.

    But you can test any url (post, page, home page, etc.) from your site with the "Facebook Debugger":

    https://developers.facebook.com/tools/debug

    In this tool you can to test any url and see the tags as Facebook see it. You can verify the meta information without cache (and some people says that testing a url with this debugger also "cleans" this cache).

    But I still waiting for a better idea!

  11. lee.sa
    Member
    Posted 1 year ago #

    Hi,

    Thanks for your explanation!

    Tried it again and tested it on Facebook debugger - but no change again!
    Also tested it on a different laptop - no change.
    The og:description is still there...

    But I will wait some time to see if its going to change though.

  12. lee.sa
    Member
    Posted 1 year ago #

    Hi,

    so after some waiting time:

    og:description disappeared in facebook debugger and in the code.
    share button dont take the changes yet. but I guess its just a matter of time until the description from AllinOne Seo works.

    AxelPiskulic does your code remove the og:type meta too? Because now fb debugger tells me:

    "Like Button Tag Missing: og:type is missing. The og:type meta tag is necessary for Facebook to render a News Feed story that generates a high click-through rate."

  13. AxelPiskulic
    Member
    Posted 1 year ago #

    Hello Lee.sa,

    If you are using a cache plugin in your site (like WP Super Cache or W3 Total Cache), you may need to reset the cache in your site to see the changes immediately.

    Removing the code I suggested you only remove the og description, but may be a good idea to reinstall a fresh version of "WP Facebook Open Graph protocol plugin" and remove the code from the wp-facebook-ogp.php archive again, if you think it is possible the file was corrupted in the first process. In my blog (amarseaunomismo.com) you can see the plugin at work (with og-type meta tag and without og-description meta tag).

    If you want please share a link to your website to see the meta tags and the cache issue.

    Axel

  14. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

    this thread seems a little off topic but we're working on addressing most of the filter issues w/ the seo plugins. Beta version needs more testing as it fixes a lot and has a lot of additions and changes. Just need some more time to test and should be up in near future.

  15. AxelPiskulic
    Member
    Posted 1 year ago #

    Thank you very much for your work, Chuck!

  16. Ava Naves
    Member
    Posted 1 year ago #

    For whatever it's worth, I've made the code changes suggested by OldGrumpyDE, and they seem to have fixed the issue. Thank you, OldGrumpyDE.

  17. Chuck Reynolds
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic