I am trying to change the author meta tag. Now, when a user goes to share something to facebook, then the author meta tag is displayed his name. I want to change it to his username.
Username is used for login - it's the half info required for someone to login into the website. Therefore, it is not a wise idea to reveal such sensitive data to the public.
There is always the author alias field that can be used on a per article basis, to override the author name. See screenshot below:
Alternatively, you could just change the name of the author-user to a nickname desired for signing the articles, but anyhow avoid publishing the login username.
As a last note, keep in mind that you can totally hide the meta-author tag, from the global configuration settings.
I need it for the use of facebook share, because it is generating the name of the author and i do not want this. and it is difficult for every article to change the author name to a nickname. So in global configuration i disable the meta-author tag but the name is still displayed in the preview facebook share.
As for why FB still publishes the author, after changing the Global Configuration settings, it can be cached data. Apart of "local" Joomla cache, FB scrapper also caches the content of a page, and it won't show any changes in the meta in less than 24 hours.
You can review how FB sees your page at the FB scrapper debug tool:
Also this Q/A might be helpful regarding Facebook: Facebook Share - Remove: "The Joomla! content management system lets you create webpages..."
But first you want to make sure that you have actually removed the author metatag from your pages. Although disabled from the global configuration, a 3rd party SEF extension, or an extension to generate the FB og:meta, might still keep injecting the author-meta in the head of the html of your page.
Checking the head of the html page in the source code of your page with your browser's inspector will help you see, if the following metas have been removed:
<meta name="author" content="authorname"> <meta property="article:author" content="authorname">