dousa2794 2015-04-10 17:52
浏览 53
已采纳

打开Graph标签不能在WordPress / Codeigniter集成中工作

My website is wpci-dev.com. I have integrated a Codeigniter web application with WordPress. In the WordPress theme header, I have placed these meta tags:

<meta property="og:title" content="RealConnect Dev Site"/>
<meta property="og:url" content="http://wpci-dev.com"/>
<meta property="og:description" content="This is a development site for Birch Studio Graphic's RealConnect web application."/>
<meta property="og:image" content="http://wpci-dev.com/images/BSGlogoBLK.jpg"/>
<meta property="og:type" content="website"/>

If I use the Facebook Debugger with wpci-dev.com, the scraper picks up my meta tags and displays the content correctly when shared. I can also check wpci-dev.com/about-us/ with the debugger and get the correct results.

The problem is when I try to share a page that is rendered using Codeigniter - wpci-dev.com/details/residential/449153/, the open graph tags are not being scraped:

Object debugger response

If I click on the "See exactly what our scraper sees for your URL" link, It displays a white page with the text "Document returned no data":

Scraper response

We developed another site, MyCAAR.com, which is built completely in Codeigniter (no WordPress), and the open graph tags work correctly for all of the pages. So, I don't think this is a Codeigniter issue. I think it has something to do with the Codeigniter/WordPress integration.

I have searched far and wide for answers to this issue with no luck. Any help is appreciated.

  • 写回答

1条回答 默认 最新

  • douqian2524 2015-04-12 16:48
    关注

    http://wpci-dev.com/details/residential/449153/ returns an HTTP status code 404 Not Found, even when requested via a normal browser. Therefor, the Facebook scraper will consider this an error, and not take any OG meta data from the source, even if it should be in fact present.

    Your server explicitly tells every HTTP client that the requested content does not exist. The fact that common browsers still display the HTTP response body content in such cases doesn’t change that one bit (and they only do so, because it is supposed to contain an error message readable by humans.)

    So you’ll need to investigate why these page(s) are served with a 404 status code, and fix it to return a “normal” 200 OK. (Specifics will depend on how exactly your WP/CI integration works and what it does.)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 C#中的编译平台的区别影响
  • ¥15 软件供应链安全是跟可靠性有关还是跟安全性有关?
  • ¥15 电脑蓝屏logfilessrtsrttrail问题
  • ¥20 关于wordpress建站遇到的问题!(语言-php)(相关搜索:云服务器)
  • ¥15 【求职】怎么找到一个周围人素质都很高不会欺负他人,并且未来月薪能够达到一万以上(技术岗)的工作?希望可以收到写有具体,可靠,已经实践过了的路径的回答?
  • ¥15 Java+vue部署版本反编译
  • ¥100 对反编译和ai熟悉的开发者。
  • ¥15 带序列特征的多输出预测模型
  • ¥15 Python 如何安装 distutils模块
  • ¥15 关于#网络#的问题:网络是从楼上引一根网线下来,接了2台傻瓜交换机,也更换了ip还是不行