[Plugin: Facebook] A few OG graph issues fix
-
In fb-open-graph.php file.
I found many issues with there own go graph file, just warnings, if I locate any more I’ll post them here or on my site https://christopherdubeau.com.
Can test your site here: https://developers.facebook.com/tools/debug
The line
'https://ogp.me/ns#locale' => =fb_get_locale(),
Should be
'https://ogp.me/ns#locale' => strtolower(fb_get_locale()),
The OG graph needs the en_US to be lowercase.
Also there is no og:url for the home page.
I added two lines to it
$url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $meta_tags['https://ogp.me/ns#url'] = $url;
See below for the whole script.
$meta_tags = array( 'https://ogp.me/ns#locale' => strtolower(fb_get_locale()), 'https://ogp.me/ns#site_name' => get_bloginfo( 'name' ), 'https://ogp.me/ns#type' => 'website' ); if ( is_home() || is_front_page() ) { $url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $meta_tags['https://ogp.me/ns#title'] = get_bloginfo( 'name' ); $meta_tags['https://ogp.me/ns#description'] = get_bloginfo( 'description' ); $meta_tags['https://ogp.me/ns#url'] = $url;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Plugin: Facebook] A few OG graph issues fix’ is closed to new replies.