Facebook没有获取元标记,并且无法删除网址 [英] Facebook not getting meta tag and not able to scrap URL

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

问题描述

我使用addthis在社交网站上分享。我试图在FB上分享标题,描述等。它是工作,但没有得到我的标题和描述。



我使用的是Open Graph Debugger工具,它说


网址XXXXX的网址无效,因为未提供string类型的必需属性og:title。


当我点击 Scraped URL看看我们的刮刀看到的URL是什么
它显示无。
那么是什么问题?



代码:

 <!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-Typecontent =text / html; charset = UTF-8/>
< meta property =og:titlecontent =APPOITMENT/>
< meta property =og:typecontent =article/>
< meta property =og:urlcontent =http:// xxxxxxxx / client / appointment / index/>
< meta property =og:site_namecontent =CBD/>
< meta property =og:descriptioncontent =Workday,cloud-的提供者/>

我做了一些调试。我使用codeigniter框架和我使用 .htaccess 文件的重定向目的。当我使用相同的代码在核心PHP文件,那么它是工作。但在codeigniter中它不工作。



.htaccss:


$ b b

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



似乎CI使用像controller / function /这样的URL。所以我认为这是FB不能scarp页的原因。所以我需要创建单个php文件包含元标记?

解决方案

尝试调试根URL。
https://developers.facebook.com/tools/debug/ p>

这也会迫使Facebook更新您的中继资料。


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.

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

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?

code:

<!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-" />

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]

EDIT:

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?

解决方案

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

This will also force Facebook to update your meta details.

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

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