规范网址在Facebook上链接而不是真实的URL。动态OpenGraph标签空白 [英] Canonical url being linked on Facebook rather than real URL. Dynamic OpenGraph tags coming up empty

查看:131
本文介绍了规范网址在Facebook上链接而不是真实的URL。动态OpenGraph标签空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站是一个工作网站如果我现在可以分享一份工作,例如:

My website is a jobs website If I share a job at the moment the url could be for example

http://jobs.com/jobs/show-job/143/Jobit-flyers-put-up/其他/

但是,要尝试刮擦 http://jobs.com/jobs/show-job/ ,因为这是规范的网址。

But facebook with try to scrape http://jobs.com/jobs/show-job/ because that is the canonical url.

有人发布时真的很糟糕因为所有的OpenGraph标签都是空的,所以链接得到错误的缩略图和空白信息。谁知道如何解决这个问题?

This really sucks when someone posts it on facebook because all the OpenGraph tags are empty so the link gets the wrong thumbnail and blank information. Who knows how to fix this?

推荐答案

修正了

您正在创建的动态页面的标题只是使用元标记

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(); ?>" >

这篇关于规范网址在Facebook上链接而不是真实的URL。动态OpenGraph标签空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆