最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugin development - Open Graph Object Debugger & url parameters - Page Not Found result

programmeradmin1浏览0评论

I am using a template on a page via a shortcode and using a URL parameter to indicate what data should be displayed. It displays perfectly on the site, BUT when you pass the page URL to the Facebook Open Graph Object Debugger, the code reacts as if the parameter is not there and, according to the coding, redirect to a page not found.

 add_shortcode('DETAILS_PAGE', 'details_Page');
 function details_Page($atts)
  {
  // Get the database record for this details
  $DatabaseId = $_GET['ls'];

  if(!is_numeric ($DatabaseId))
    {
    // GO TO MISSING PAGE. PAGE IS NOT VALID. 
    DebugLog('Not numberid: DBID: ' . $DatabaseId );
    header('Location: /missing-page/');  <=== facebook see this page
    return;
   }
 }

Does anyone have any experience with the Open Graph Object process? It is like it does not wait until the page is built or something. Bit of mystery and I new in this area of development.

发布评论

评论列表(0)

  1. 暂无评论