Topic: OpenGraph protocol not working properly on facebook

Hello,

I tried to use the getPostTitle method to define the og:title metadata as shown below:

<meta property="og:title" content="<?php echo Blog::getPostTitle(); ?>">

But Facebook is not loading the value properly.
Any clue about what is happening?

barichello's Website

Re: OpenGraph protocol not working properly on facebook

nice code

<meta property="og:title" content="<?php echo Site::title(); ?>">

3 (edited by barichello 2015-08-15 10:45:42)

Re: OpenGraph protocol not working properly on facebook

But this way, Facebook will show the title of the website, I want it to show the title of the particular post. Am I right?

barichello's Website

4 2015-08-15 11:34:07

Re: OpenGraph protocol not working properly on facebook

@barichello
in this way will normally show the title on facebook!

<meta property="og:title" content="<?php echo Site::title(); ?>">
Here you will find templates for monstra and morfy xxwebplus
Proposals to create a new template for monstra and morfy tell me your proposals xxwebplus

xxwebplus's Website

Re: OpenGraph protocol not working properly on facebook

Still not working...

You can see the post in my facebook page: https://www.facebook.com/leo.barichello
It is the first and probably will be for a couple of days.

And I am using this as metadata:

<meta property="og:site_name" content="barichello.coffee">
<meta property="og:url" content="http://www.barichello.coffee/blog">
<meta property="og:title" content="<?php echo Site::title(); ?>">
<meta property="og:image" content="http://www.barichello.coffee/public/uploads/fumacaface.png">
<meta property="og:type" content="article" />

barichello's Website

Re: OpenGraph protocol not working properly on facebook

for me it works!

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="x-dns-prefetch-control" content="on">
    <link rel="dns-prefetch" href="<?php echo Site::url(); ?>" />
    <link rel="dns-prefetch" href="//www.google-analytics.com" />
    <title><?php echo Site::name() . ' - ' . Site::title(); ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="<?php echo Site::description(); ?>">
    <meta name="keywords" content="<?php echo Site::keywords(); ?>">
    <meta name="robots" content="<?php echo Page::robots(); ?>">
    <?php Action::run('theme_meta'); ?>
    <!-- Open Graph Protocol -->
    <meta property="og:site_name" content="<?php echo Site::name(); ?>">
    <meta property="og:url" content="<?php echo Url::current(); ?>">
    <meta property="og:title" content="<?php echo Site::title(); ?> | <?php echo Site::name(); ?>">
    <!-- Google+ Snippets -->
    <meta itemprop="url" content="<?php echo Url::current(); ?>">
    <meta itemprop="name" content="<?php echo Site::title(); ?> | <?php echo Site::name(); ?>">
Here you will find templates for monstra and morfy xxwebplus
Proposals to create a new template for monstra and morfy tell me your proposals xxwebplus

xxwebplus's Website