Można Zmienne już masz a tutaj znajdziesz znaczniki:
https://developer.twitter.com/en/doc...g-started.html
Można Zmienne już masz a tutaj znajdziesz znaczniki:
https://developer.twitter.com/en/doc...g-started.html
Na Forum pomagam bezpłatnie ad maiorem Joomla gloriam
Mimo pomocy na forum nie dajesz rady? Potrzebujesz by ekspert "zrobił to" za Ciebie?
Napisz do mnie na PW. Argentum et Aurum nie zawsze jest konieczne ;)
tak to ma wyglądać?
Kod PHP:
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@nytimesbits" />
<meta name="twitter:creator" content="@nickbilton" />
<meta property="og:url" content="article" />
<meta property="og:title" content="'.$og_title.'" />
<meta property="og:description" content=" content="'.$og_desc.'" />
<meta property="og:image" content="'.$og_image.'" />
Nie Nie ma sensu przecież powielać tagów które już masz
Dodałeś je przecież stąd: http://forum.joomla.pl/showthread.ph...l=1#post383126
Wystarczy:
Oczywiście podaj swoje dane.Kod:<meta name="twitter:card" content="summary" /> <meta name="twitter:site" content="@nytimesbits" /> <meta name="twitter:creator" content="@nickbilton" />
Czyli cały kod wyglądałby tak:
Kod PHP:
$doc = JFactory::getDocument();
$app = JFactory::getApplication();
$og_url = JURI::current();
$og_image = $this->image->img_src;
$og_title = $this->escape($this->image->imgtitle);
$og_image_alt = $og_title;
$og_desc = strip_tags($this->image->imgtext);
$og_sitename = $app->getCfg('sitename');
$doc->addCustomTag('<meta name="twitter:card" content="summary" />');
$doc->addCustomTag('<meta name="twitter:site" content="@nytimesbits" />');
$doc->addCustomTag('<meta name="twitter:creator" content="@nickbilton" />');
$doc->addCustomTag('<meta property="og:type" content="article"/>');
$doc->addCustomTag('<meta property="og:url" content="'.$og_url.'"/>');
$doc->addCustomTag('<meta property="og:site_name" content="'.$og_sitename.'"/>');
$doc->addCustomTag('<meta property="og:image" content="'.$og_image.'"/>');
$doc->addCustomTag('<meta property="og:description" content="'.$og_desc.'"/>');
$doc->addCustomTag('<meta property="og:title" content="'.$og_title.'"/>');
Na Forum pomagam bezpłatnie ad maiorem Joomla gloriam
Mimo pomocy na forum nie dajesz rady? Potrzebujesz by ekspert "zrobił to" za Ciebie?
Napisz do mnie na PW. Argentum et Aurum nie zawsze jest konieczne ;)
Coś jest nie tak, nie wczytuje na Twitterze
Kod PHP:
<?php defined('_JEXEC') or die('Direct Access to this location is not allowed.');$doc = JFactory::getDocument();
$app = JFactory::getApplication();
$og_url = JURI::current();
$og_image = $this->image->img_src;
$og_title = $this->escape($this->image->imgtitle);
$og_image_alt = $og_title;
$og_desc = strip_tags($this->image->imgtext);
$og_sitename = $app->getCfg('sitename');
$doc->addCustomTag('<meta name="twitter:card" content="summary" />');
$doc->addCustomTag('<meta name="twitter:site" content="@MiastaDawniej" />');
$doc->addCustomTag('<meta name="twitter:creator" content="@MiastaDawniej" />');
$doc->addCustomTag('<meta property="og:type" content="article"/>');
$doc->addCustomTag('<meta property="og:url" content="'.$og_url.'"/>');
$doc->addCustomTag('<meta property="og:site_name" content="'.$og_sitename.'"/>');
$doc->addCustomTag('<meta property="og:image" content="'.$og_image.'"/>');
$doc->addCustomTag('<meta property="og:description" content="'.$og_desc.'"/>');
$doc->addCustomTag('<meta property="og:title" content="'.$og_title.'"/>'); ?>
Nie ma konta na Twitterze. Sprawdź w walidatorze: https://cards-dev.twitter.com/validator
Na Forum pomagam bezpłatnie ad maiorem Joomla gloriam
Mimo pomocy na forum nie dajesz rady? Potrzebujesz by ekspert "zrobił to" za Ciebie?
Napisz do mnie na PW. Argentum et Aurum nie zawsze jest konieczne ;)
Kod:INFO: Page fetched successfully INFO: 14 metatags were found ERROR: No card found (Card error)
Zmień:
na:Kod PHP:
$doc->addCustomTag('<meta name="twitter:card" content="summary" />');
Dodaj pod:Kod PHP:
$doc->addCustomTag('<meta name="twitter:card" content="summary_large_image" />')
Kod PHP:
$doc->addCustomTag('<meta name="twitter:image" content="'.$og_image.'"/>');
Na Forum pomagam bezpłatnie ad maiorem Joomla gloriam
Mimo pomocy na forum nie dajesz rady? Potrzebujesz by ekspert "zrobił to" za Ciebie?
Napisz do mnie na PW. Argentum et Aurum nie zawsze jest konieczne ;)
niestety bez zmian
A wynik debugowania?
Na Forum pomagam bezpłatnie ad maiorem Joomla gloriam
Mimo pomocy na forum nie dajesz rady? Potrzebujesz by ekspert "zrobił to" za Ciebie?
Napisz do mnie na PW. Argentum et Aurum nie zawsze jest konieczne ;)
Taki sam jak wcześniej Unable to render Card preview
Załącznik 9658