php - Facebook og meta tags - scrapper fetches nothing -
so have cakephp project, when share link facebook don't og:description, og:image etc, though seems there.
my code: (views/layouts/default.ctp)
<head> ... <meta property="og:url" content="<?=configure::read('og_url');?>landing" /> <meta property="og:title" content="<?=configure::read('app_title');?>" /> <meta property="og:description" content="<?=configure::read('og_description');?>" /> <meta property="og:image" content="<?=configure::read('og_image');?>" /> ... </head> i initialize in bootsrap.php files can have access these values.
which produces this, view page source:
<head> ... <meta property="og:url" content="https://www.philippidescompetition.com/landing" /> <meta property="og:title" content="back school spin & win! " /> <meta property="og:description" content="Συμπλήρωσε τα στοιχεία σου και παίξε "spin & win"!" /> <meta property="og:image" content="https://www.philippidescompetition.com/img/wheel/og_image_s.jpg" /> ... </head> so far good, when share link on facebook i don't of meta data. tried debugger tool, didn't help.
i want share philippidescompetition.com/landing link, redirects facebook app page or actual url philippidescompetition.com/users/register on server, according if desktop or mobile, thinking redirect causes issue, if share philippidescompetition.com/users/register doesn't have redirect, meta data still empty
any ideas?
you need add exception automatic redirect facebook scraper.
it can recognized user-agent, see https://developers.facebook.com/docs/plugins/faqs#faq_1748179212062572
Comments
Post a Comment