2015-01-29, 19:09:32
(This post was last modified: 2015-01-29, 19:32:12 by TrueWarrior.)
(2015-01-28, 21:13:17)TeeJay Wrote:after adding this to my page it wont load and go just blank o O(2015-01-28, 17:20:52)TrueWarrior Wrote: Well the problem is not with placing buttons, problem is in that they dont share proper content - after clicking share it should share post name, image and post content and in my case it only share main site content
Then just add open graph meta tags into your head with proper content.
This is how I do it:
Code:<?php
global $pageURL;
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
?>
<meta property="og:locale" content="cs_CZ">
<meta property="og:site_name" content="<?php get_site_name(); ?>">
<?php if (nm_post_has_image()) { ?>
<meta property="og:image" content="<?php nm_post_image_url(900,471,1); ?>">
<?php } ?>
<meta property="og:image" content="<?php get_theme_url(); ?>/images/facebook-300-300.png">
<meta property="og:title" content="<?php if (nm_is_single()) { nm_post_title(); ?> | <?php get_site_name(); } else { echo(get_custom_title_tag()); }?>">
<meta property="og:description" content="<?php nm_post_excerpt(225) or get_page_excerpt(225); ?>">
<meta property="og:type" content="website">
<meta property="og:url" content="<?php echo $pageURL; ?>">
you can se this here http://truewarriors.eu/getsimple/