[Resolved] [Plugin: WP Facebook Open Graph protocol] Problem with trailing slash in home page url
We have a website where we use wpfbogp and we have had some problems with og:url -tag.
Facebook debugger complains that “… property values for a given property being mismatched. Here are the input property =>content pairs that were not seen in the parsed result: ‘og:url => [our site url WITH trailing slash]”
At website the meta og:url tag is WITHOUT the trailing slash on home page.
The problem is that Facebook always adds the trailing slash in to url and WordPress always strips it off when stored in the general settings and that causes mismatch in Facebook url comparison.
I solved the problem by modifying wpfbogp code like this (line 112):
before: $wpfbogp_url = get_bloginfo( ‘url’ );
after: $wpfbogp_url = get_bloginfo( ‘url’ ) . ‘/’;
I don’t know if this breaks anything now or in the future because it concerns only the homepage and Facebook seems to add the trailing slash in the url field regardless if it is in the url field in Facebook application settings. It is always possible that FB will stop modifying the url field content in the future.
Your competitor has found out the same problem and decided to make tariling slash optional 🙂 See version 0.1.9 in http://wordpress.org/extend/plugins/wonderm00ns-simple-facebook-open-graph-tags/changelog/
- The topic ‘[Resolved] [Plugin: WP Facebook Open Graph protocol] Problem with trailing slash in home page url’ is closed to new replies.