Photo thumbnail tidak tampil di dinding facebook dan WhatsappDibuat
Login Terakhir
1 Tahun lalu,
Telah Dilihat 2539 Kali
| |
Sultan Account |
|
|
Saefullah11
Mengatakan :
Sultan Account
Assalamualaikum Warahmatullahi Wabarakatuh... Bagaimana cara menampilkan Photo thumbnail ketika melakukan share ke sosial media pada Web Portal Kampus Responsive Codeigniter 3,x ? |
|
| sudirman saputra commented on 04 Sep 2019 01:42:26 Sultan Account |
|
|
|
Assalamualaikum,.. saya coba jawab mas ^_^ di websitenya apakah sudah terpasang opengraph (OG) ? jika belum mas coba dulu buat meta og nya,, contoh : <meta property="og:title" content="<?php echo $title; ?>" /> <meta property="og:description" content="<?php echo $iden['meta_deskripsi']; ?>" /> <meta property="og:url" content="<?php echo "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; ?>" /> <meta property="og:site_name" content="<?php echo $iden['nama_website']; ?>" /> <meta property="og:image:type" content="jpg"/> <meta property="og:type" content="article" /> untuk lebih jelasnya sudah ada dibahas di topic ini https://members.phpmu.com/forum/read/mohon-dijawab-swarakalibata-ci |
|
| sudirman saputra commented on 04 Sep 2019 01:47:22 Sultan Account |
|
|
|
Assalamualaikum,.. untuk mengecek meta properti OG nya, bisa menggunakan debugger objek dari facebook https://developers.facebook.com/tools/debug/og/object/ |
|
| Bukhori Muslim commented on 05 Sep 2019 06:11:23 Sultan Account |
|
|
|
Assalamualaikum,.. Alhamdulillah sudah dibantu jawab oleh agan Sudirman Saputra. Jazakallahu Khoir,.. ^_^ |
|
| Khoirul Amin commented on 04 Jul 2020 15:53:56Free Account |
|
|
|
Assalamualaikum,.. hasil cek debug nya via facebook https://developers.facebook.com/tools/debug/?q=https%3A%2F%2Fwww.stainh.ac.id%2F |
|
| PHPMU.COM Support commented on 05 Jul 2020 09:53:13 Sultan Account |
|
|
|
Salah satu jawaban terbaik,.. Assalamualaikum,.. "Khoirul Amin" : coba buka file
application\views\phpmu-tigo\template.php
Dan tambahkan didalam tag head script berikut :
<?php
if ($this->uri->segment(1)=='berita' AND $this->uri->segment(2)=='detail'){
$rows = $this->model_utama->view_where('berita',array('judul_seo' => $this->uri->segment(3)))->row_array();
$image = base_url().'asset/foto_berita/'.$rows['gambar'];
}else{
$berita = $this->model_utama->view_where('berita',array('judul_seo' => $this->uri->segment(1)));
if ($berita->num_rows()>=1){
$rows = $berita->row_array();
$image = base_url().'asset/foto_berita/'.$rows['gambar'];
}else{
$image = base_url().'asset/images/favicon.png';
}
}
echo '<meta property="og:title" content="'.$title.'"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://'.$_SERVER['HTTP_HOST'].''.$_SERVER['REQUEST_URI'].'" />
<meta property="og:image" content="'.$image.'"/>
<meta property="og:description" content="'.$description.'"/>';
?> |
|