Facebook没有获得元标记,也无法抓取网址 [英] Facebook not getting meta tag and not able to scrape URL

查看:51
本文介绍了Facebook没有获得元标记,也无法抓取网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用addthis在社交网站中共享.我正在尝试在FB上共享标题,描述等.它正在运行,但没有我的标题和描述.

I am using addthis for sharing in social networking site. I am trying to share title, description etc. on FB. It is working but not getting my title and description.

我正在使用Open Graph Debugger工具,它表示

I am using an Open Graph Debugger tool, it says that

URL类型为网站"的"XXXXX"处的对象无效,因为未提供类型为字符串"的必需属性"og:title".

Object at URL 'XXXXX' of type 'website' is invalid because a required property 'og:title' of type 'string' was not provided.

当我单击

when i click on Scraped URL See exactly what our scraper sees for your URL it display none. so what is the problem?

代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta property="og:title" content="APPOITMENT" />
<meta property="og:type" content="article" />
 <meta property="og:url" content="http://xxxxxxxx/client/appointment/index" />
 <meta property="og:site_name" content="CBD"/>
  <meta property="og:description" content="Workday, a provider of cloud-" />

我已经进行了一些调试.我使用codeigniter框架,并使用 .htaccess 文件进行重定向.当我在核心php文件中使用相同的代码时,它正在工作.但是在codeigniter中它不起作用.

I have done some debugging. I use codeigniter framework and i use .htaccess file for redirecting purpose. when i use same code in core php file, then it is working. but in codeigniter it is not working.

.htaccss:

 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule .* index.php/$0 [PT,L]

CI似乎使用了类似controller/function/之类的URL.所以我认为这是FB无法简化页面的原因.所以我需要创建一个包含meta标签的单个php文件吗?

It seems that CI use URL like controller/function/. so i think this is the reason FB not able to scarp page. so do i need to create single php file that contains meta tag?

推荐答案

尝试调试您的根URL. https://developers.facebook.com/tools/debug/

Try to debug your root URL. https://developers.facebook.com/tools/debug/

这也将迫使Facebook更新您的元详细信息.

This will also force Facebook to update your meta details.

这篇关于Facebook没有获得元标记,也无法抓取网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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