Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <meta property="og:image"content="http://example.com/images/loginPageCarausel/unnamed.png" />
- <meta property="og:title" content="Some Title" />
- <meta property="og:url" content="http://example.com" />
- <meta property="og:description" content="No Description" />
- <meta property="og:image:type" content="image/jpeg" />
- <meta property="og:image:width" content="400" />
- <meta property="og:image:height" content="300" />
- <?php
- include_once 'includes/functions.php';
- $pg = getPageName('pages.php');
- if($pg) {
- if(isset($_GET['poll'])) {
- $i = $_GET['poll'];
- if(class_exists('Polls') && class_exists('FilesUpload')) {
- $vip_poll = Polls::getPollDataById(POST_TBL, $i);
- $title = $vip_poll->question;
- $gen = $vip_poll->poll_genre;
- $vip_pollOwnersId = $vip_poll->user_id;
- $media_files = FilesUpload::getMediaFiles(MED_TBL, $i, $vip_pollOwnersId);
- $f_type = $media_files->file_type;
- $f = $media_files->file_name;
- $img_ext_array = array('jpg', 'gif', 'jpeg', 'png');
- if (in_array($f_type, $img_ext_array)) {
- $analysis = Polls::select_all_from_graph_page_data(GP_DATA_TBL, $vip_pollOwnersId, $i);
- if($analysis != false) {
- if (!empty($analysis)) {
- $analysis_data = $analysis->data;
- if (strlen($analysis_data) > 300) {
- $analysis_data = substr($analysis_data, 0, 300) . "...";
- }
- $analysis = $analysis_data; ?>
- <meta property="fb:app_id" content="1775**************">
- <meta property="og:image" content="http://www.example.com/<?=$f?>" />
- <meta property="og:title" content="<?=$title?>" />
- <meta property="og:url" content="http://example.com/pages.php?vip_poll=<?=$i?>&genre=<?=$gen?>" />
- <meta property="og:description" content="<?=$analysis_data?>" />
- <meta property="og:image:type" content="image/jpeg" />
- <meta property="og:image:width" content="400" />
- <meta property="og:image:height" content="300" />
- <?php }
- }
- }
- }
- }
- }
- ?>
- https://developers.facebook.com/docs/sharing/webmasters/crawler
- RewriteCond %{HTTP_USER_AGENT} ^facebookexternalhit
- RewriteRule ^(.*)$ ogtags.php?$1 [L,QSA]
- RewriteCond %{HTTP_USER_AGENT} facebookexternalhit [NC,OR]
- <div class="fb-share-button" data-href="http://www.example.com/pages.php?vip_poll='+app_id+'" data-layout="button_count" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u='+url_enc+'&src=sdkpreparse"><span id="fb_span"><i class="fa fa-facebook-official" aria-hidden="true" style="color: white"></i> Share </span></a></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement