How to add the author name when sharing on Facebook

3.4k views Asked by At

I'm just trying to add the name of the author in the share box dialog in FB

enter image description here

I've added the following meta and og property:

<meta name="author" content="foutight.com">   
<meta property="og:type" content="article"/>
<meta property="og:article:author" content="foutight.com"/>

But no success. Any suggestions. Thanks.

4

There are 4 answers

0
Tom Waddington On BEST ANSWER

That comes from the <meta name='author' content='...'/> section. It looks like it's appearing on http://foutight.com/posts/photo/242 - maybe you've just got a cached page?

Run it through oglint.com, and try and re-scrape it.

2
Luiz Eduardo Simões On

Try the author whitout the "og".

<meta property="og:type" content="article"/> 
<meta property="article:author" content="foutight.com"/>
0
Rajesh Banoth On
<meta name="author" content="foutight.com"> 
<meta property="article:author" content="https://www.facebook.com/author_profile" />

article:author may contain an array of Facebook profile URLs or IDs of the authors for this article.

https://developers.facebook.com/docs/reference/opengraph/object-type/article/

1
chauit On

Open function.php and add code :

function author_chauit() {
if ( is_singular('post') ) {
echo '<meta name="author" content="'.get_the_author().'">';
} else {
echo '<meta name="author" content="'.get_bloginfo( 'name' ).'">';
}
}
add_action( 'wp_head', 'author_chauit' );

notes : add in end functioncode