1

Прописал мета-теги в проекте, чтоб во время шеринга подтягивало нужную картинку. На facebook сначала подтягивало логотип, но в связи с изменениями разрешения на fb 1200*630 изменил картинку, но все равно подтягивает старый лого, вместо прописанной картинки... Вот код, который я использовал в heder... Почему у меня не подтягивает картинку из метатегов?

<html lang="en" >    
  <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta property="og:type" content="image/jpeg">
    <meta property="og:image" content="http://www.mysite.com/images/faimage.jpg" >
    <meta property="og:url"  content="http://www.mysite.com/">
    <meta property="og:title"  content="my_site">
    <meta property="og:description" content="Something text">

    <meta property="og:image:type"  content="image/jpeg">
    <meta property="og:image:width" content="1200" >
    <meta property="og:image:height" content="630" >

Отладка fb https://developers.facebook.com/tools/debug/sharing/ все ранво показывает:

Inferred Property     The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property     The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property     The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
Share App ID Missing  The 'fb:app_id' property should be explicitly provided, Specify the app ID so that stories shared to Facebook will be properly attributed to the app. Alternatively, app_id can be set in url when open the share dialog.

А мета-теги НЕ обрабатывает...

<!DOCTYPE html>
  <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <meta charset="UTF-8">
      <meta name="robots" content="noindex,nofollow">
    </head>

ЧТО мне нужно сделать, чтоб отображалась faimage.jpg во время шеринга?

4
  • 1
    У FB есть дебаггер developers.facebook.com/tools/debug , с помощью которого можно обновить данные для шаринга. Попробуйте с помощью него перескрапить страницу.
    – br3t
    30 мая 2017 в 20:35
  • 1
    Как я помню в head надо записать так <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#". А в html убрать то что связано с og 31 мая 2017 в 11:53
  • Razmik Galstyan, я меняю строку <head> на строку <head prefix="og: ogp.me/ns# fb: ogp.me/ns/fb# article: ogp.me/ns/article#"> . Сейчас попробую 31 мая 2017 в 12:15
  • Razmik Galstyan, сделал изменения.....все по-прежнему.....картинка не подтягивается... 31 мая 2017 в 12:19

1 ответ 1

0

Дебаггер facebook (developers.facebook.com/tools/debug) при отладке показывает информацию отладки введенного сайта. Обработанный скрапером URL НЕ показывает мета-теги в коде страницы, а пишет один мета-тег:

<meta name="robots" content="noindex,nofollow">

данная проблема решается путем добавления мета-тега:

<meta name="robots" content="index, follow">

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.