Open graph yükledim siteme konunun sayfasındayken incele dediğimde herşey normal şekilde gözüküyor konudaki resmin linki bile çıkıyor ama paylaş dediğimde konunun resmi gözükmüyor logom çıkıyor sadece bunun sebebi ne olabilir acaba facebook developerdan bakıncada og:image kısmında birsürü resim gözüküyor ilk sırada logom var kodlar aşağıda
<?php /** * Open Graph For Discuz!X 2.0 * ============================================================================ * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和使用; * 不允许对程序代码以任何形式任何目的的再发布。 * ============================================================================ * @package onexin_open_graph * @date 2012-03-14 * @author King * @copyright Copyright (c) 2012 Onexin Platform Inc. ([URL]http://www.onexin.com[/URL]) * @license 2016123113zckDkdg9ak */ if(!defined('IN_DISCUZ')) { exit('Access Denied'); } /* /-------------Step 1 - Open Graph Protocol--------------------- Open Graph types [URL]http://ogp.me/[/URL] [URL]http://developers.facebook.com/docs/opengraph#types[/URL] /-------------Step 2 - Get Open Graph Tags--------------------- <meta property="og:title" content="The Rock" /> <meta property="og:type" content="video.movie" /> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/" /> <meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" /> */ class plugin_onexin_open_graph { var $conf = array(); var $isopen = FALSE; function plugin_onexin_open_graph() { global $_G; if(!isset($_G['cache']['plugin'])){ loadcache('plugin'); } $this->isopen = $_G['cache']['plugin']['onexin_open_graph']['isopen'] ? TRUE : FALSE; if($this->isopen) { $this->conf = $_G['cache']['plugin']['onexin_open_graph']; $this->conf['type'] = $this->conf['type'] ? $this->conf['type'] : 'article'; $this->conf['site_name'] = $this->conf['site_name'] ? $this->conf['site_name'] : $_G['setting']['bbname']; $this->conf['msg_length'] = $this->conf['msg_length'] ? $this->conf['msg_length'] : '160'; $this->conf['fb_appid'] = $this->conf['fb_appid'] ? $this->conf['fb_appid'] : ''; } } //Open Graph Tags function ogcode($fdata){ $ogcode = " <meta property=\"og:description\" content=\"$fdata[description]\" /> <meta property=\"og:title\" content=\"$fdata[title]\" /> <meta property=\"og:type\" content=\"$fdata[type]\" /> <meta property=\"og:url\" content=\"$fdata[url]\" /> <meta property=\"og:site_name\" content=\"$fdata[site_name]\" /> <meta property=\"fb:app_id\" content=\"$fdata[fbapp_id]\" /> "; foreach($fdata['image'] as $val){ $ogcode .= "<meta property=\"og:image\" content=\"$val\" />"."\r\n"; } return rtrim($ogcode); } function ogimage($message, $num = '10') { global $_G; $mathes = $ogimage = array(); $message = preg_replace("/\<img src=\".*?image\/smiley\/(.+?).gif\" smilieid=\"\d+\".*?\>/", '', $message); $message = preg_replace("/src=\".*?\" file=\"/", 'src="', $message); preg_match_all("/\<img\s+.*?src=[\'\"]*([a-z0-9\/\-_+=.~!%@?#%&;:$\\()|]+)[\'\"\s\>]+/is", $message, $mathes); $mathes = array_unique($mathes[1]); if(is_array($mathes) && !empty($mathes)) { foreach($mathes as $key => $val) { if($key < $num){ if(preg_match("/http:\/\/(.*?)/", $val, $mat)){ $ogimage[] = trim($val); }else{ $ogimage[] = $_G['siteurl'].trim($val); } } } } return $ogimage; } function global_header() { global $_G, $article, $content; if(!$this->isopen) return ''; //Portal if(CURMODULE == 'view' && CURSCRIPT == 'portal'){ $_fmessage = $content['content']; //$summary $fdata = array( 'title' => strip_tags($article['title']), 'description' => htmlspecialchars(trim($article['summary'])), 'type' => $this->conf['type'], 'url' => $_G['siteurl'].'portal.php?mod=view&aid='.$article['aid'], 'site_name' => $this->conf['site_name'], 'image' => $this->ogimage($_fmessage, $this->conf['image_num']), 'fbapp_id' => $this->conf['fb_appid'], ); //Open Graph Tags $_G['setting']['seohead'] = $_G['setting']['seohead'] . $this->ogcode($fdata); } } } // forum class plugin_onexin_open_graph_forum extends plugin_onexin_open_graph { function viewthread_title_extra_output() { global $_G, $postlist, $canonical; if(!$this->isopen) return ''; //Forum foreach($postlist as $pid => $post) { if($post['first']) $_fmessage = $postlist[$pid]['message']; } //$summary $fdata = array( 'title' => strip_tags($_G['forum_thread']['subject']), 'description' => cutstr(strip_tags(str_replace(array(' ', ' ', "\r", "\n", '\'', '"'), '', $_fmessage)), $this->conf['msg_length']), 'type' => $this->conf['type'], 'url' => $_G['siteurl'].$canonical, 'site_name' => $this->conf['site_name'], 'image' => parent::ogimage($_fmessage, $this->conf['image_num']), 'fbapp_id' => $this->conf['fb_appid'], ); //Open Graph Tags $_G['setting']['seohead'] = $_G['setting']['seohead'] . parent::ogcode($fdata); } } // home class plugin_onexin_open_graph_home extends plugin_onexin_open_graph { } // portal class plugin_onexin_open_graph_portal extends plugin_onexin_open_graph { } ?>