Meta author does not incorporate when sharing on Facebook

1

When I share a link from my site on a Facebook page, "by AUTHOR" is not appearing. I have already reported all the correct social networks within my user profile. I'm using the YOAST plugin. As I have other sites where this is working, I left the same options the same. I do not know what that can be.

Update:AnObjectDebuggererrorisappearing.

Update2:It'sworking,buttherearethesetwoerrors.

SourcecodeoftheURLthatItriedtoshare link

    
asked by anonymous 15.08.2016 / 20:10

5 answers

3

The problem is that the facebook code was injected before the doctype:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6&appId=1608515189361899";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!DOCTYPE html>

In other words, it is probable that you have entered manually, to correct, you will have to take this part and add it inside BODY in some way:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/pt_BR/sdk.js#xfbml=1&version=v2.6&appId=1608515189361899";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
    
26.08.2016 / 23:23
5

Hello, the meta tag that Facebook uses to get the author who posted the post is this:

<meta name=”author” content=”nomedoautor”>

Well, this has to be inserted somewhere in the post, for this I did the following PHP function that should be added to the functions.php

This can be done in the same wordpress by going to Control Panel → Appearance → Editor

On the side you should select Theme Functions (functions.php) and at the end of the file by pasting the following code:

function adiciona_tag_autor_facebook($content) {
    if (is_single()) {
        echo '<meta name="author" content="' . get_the_author() . '"/>';
    }
    return $content;
}

add_filter('the_content', 'adiciona_tag_autor_facebook');

Well, as the friend said above, the first time you click to share a facebook post, a cache is generated, in this case do the procedures that Fagner Souza said and try to share again in your facebook timeline. (The procedures said by it will make facebook delete the current cache and generate a new one with the updated information.)

Or else, create a new test-only post and see if the author's name appears on the facebook card.

I hope I have helped, good luck.

    
22.08.2016 / 23:34
4

Make facebook update your cache in the url: link put the url of the post and click on " Fetch new ... "

    
19.08.2016 / 01:38
1

With plugin Yoast WordPress SEO

With the Yoast WordPress SEO plugin , you need to go into SEO »Page social in the administration of WordPress and check if box next" Add Open Graph meta data "is checked.

ThenextstepistoaddyourFacebookIDtoyourWordPressaccount.JustvisitUsers»YourProfileandentertheURLofyourFacebookprofileandclicktheSavebuttontostorethesettingsasshownbelow:

NoYoastPlugin

Ifyouwanttoaddmetatag'author'toyoursitewithoutaplug-in,simplyaddthefollowingcodeinyour<head>site.

<meta property="article:publisher" content="http://facebook.com/seuperfil" />
<meta property="article:author" content="http://facebook.com/seuperfil" />

Read this links:

As for the image of the error

In its proper translation:

  

Your page has meta tags in body instead of head . This can be   because HTML is poorly formed and they have fallen lower in the tree   analyze. Please fix this so the tags to be usable.

Try formatting your code using this site: link . Maybe it has some quotes closing in wrong place.

Note

I checked the metas of the Techmundo site at Open Graph Object Debugger and the results returned these three values below referring to facebook:

<meta property="fb:pages" content="111090485635468" />
<meta property="fb:app_id" content="247082808662914" />
<meta property="fb:admins" content="valdbaixaki" />

Try to compare with your results and make the appropriate changes.

See the image below:

    
23.08.2016 / 23:11
0

The problem seems to be in HTML semantics, as urged by the facebook message:

Correctbyputtingthemetatagswithinthetag<head></head>.

Example:

<head><metaproperty="article:author" content="Nome do Autor" />

outras metatags também devem estar aqui.


</head>

After this, refresh the cache in the facebook debugger: link

Make sure you do not have other semantic errors, as facebook may still decline if you encounter another error.

To check the validity of HTML: link

And do not forget to always refresh the cache on the facebook debug page.

    
26.08.2016 / 01:46