Canonical url being linked on Facebook rather than real URL. Dynamic OpenGraph tags coming up empty

北城余情 提交于 2019-12-04 08:22:46
Josh Dean

Fixed!

Inside the header of the dynamic page you are creating simply user the meta og tag

 <meta property="og:url" content="<?php get_current_url(); ?>" >

Canonical URL is the URL that represent your OpenGraph object and this is intended to work that way!

You can see the answer I gave to similar question for more details.

Do NOT use the og:type of "website" if you are publishing an "article".

For example:

Then you have told facebook that this:

Simply put: use the following:

More information here: https://ogp.me/#type_article

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!