share fb Swarakalibata CiDibuat
Login Terakhir
1 Tahun lalu,
Telah Dilihat 2132 Kali
| |
Sultan Account |
|
|
Purjayadi
Mengatakan :
Sultan Account
ada yang tau cara agar share artikel ke facebook sesuai dengan gambar yang ada di artikel / album photonya.. |
|
| Dimas Gorgom commented on 12 Apr 2017 14:39:40 Sultan Account |
|
|
|
Wah sama ni mas, setau saya sih 'og image' fb tidak berjalan sempurna mas, cuman saya belum nemu juga ni mas caranya dan scriptnya diletakan dimana. Mudah2an para suhu bisa bantu :D...terutama mas roby. |
|
| PHPMU.COM Support commented on 12 Apr 2017 16:46:46 Sultan Account |
|
|
|
Assalam, Coba tambahkan og image mas di dalam head dengan kondisi,..
<?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();
?>
<meta property="og:image" content="<?php echo base_url()."asset/foto_berita/$rows[gambar]"; ?>" />
<?php } ?> |
|
| Purjayadi commented on 12 Apr 2017 18:40:32 Sultan Account |
|
|
|
di taruh dimana ya mas roby ???? |
|
| PHPMU.COM Support commented on 12 Apr 2017 18:53:21 Sultan Account |
|
|
|
Di dalam tag <head> mas pada file "application/views/phpmu-tigo/template.php" |
|
| Purjayadi commented on 12 Apr 2017 20:02:23 Sultan Account |
|
|
|
eror, malah jadi page not found |
|
| PHPMU.COM Support commented on 12 Apr 2017 21:06:16 Sultan Account |
|
|
|
Oo iya, ada kesalahn dari code di atas dikit, coba lagi :
<?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();
?>
<meta property="og:image" content="<?php echo base_url()."asset/foto_berita/$rows[gambar]"; ?>" />
<?php } ?> |
|