php 404 error in facebook open graph debugger

My website works fine on browser but facebook open graph debugger shows some error where php is used. The url of the link is /index.php?video/play/133/cuddly-a-short-film-by-ttt. It goes to ‘video’ controller where I have this ‘play’ function

function play($video_id = '') {
        $data['page_name'] = 'play';
        $data['video_id'] = $video_id;
        $data['page_title'] = $this->db->get_where('video', array('video_id' => $video_id))->row()->title;
        $this->load->view('frontend/index', $data);
    }

Now in this frontend/index.php file if I use this line, only for debugging purposes, <meta name="content" content="<?php echo $page_name?>" /> I see the output in facebook debugger’s scraped information as <meta name="content" content="error_404">

Whereas when I view it in the inspect element of browser I see <meta name="content" content="play">. Why is this happening?

I need this to work because based on the ‘page_name’ I include the appropriate headers on the page.


Source: facebook

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.