Facebook not getting meta tag and not able to scrap URL

安稳与你 提交于 2019-12-13 18:31:09

问题


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?


回答1:


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

This will also force Facebook to update your meta details.



来源:https://stackoverflow.com/questions/25527745/facebook-not-getting-meta-tag-and-not-able-to-scrap-url

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