Customize facebook button in bellow code
<div style="width:100%;height:50px"& gt;<div class="share1">
<!---------------------Share facebook start------------------------>
<div data-href="<?php echo 'http://'.$_SERVER['HTTP_HOST '].$_SERVER['REQUEST_URI'];?& gt;" data-layout="button_count" data-mobile-iframe="true">&l t;a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/share r/sharer.php?u=<?php echo 'http://'.$_SERVER['HTTP_HOST '].$_SERVER['REQUEST_URI'];?& gt;&src=sdkpreparse"><img src="<?php echo "http://".$_SERVER['HTTP_HO ST']."/sharing/";?>image s/fb_share.png" style="width:100px;height:30px;displ ay:block"/></a>
</div>
<!---------------------Share facebook link end------------------------>
</div>
This is your webpage address that you want to share on facebook
data-href="<?php echo 'http://'.$_SERVER['HTTP_HOST '].$_SERVER['REQUEST_URI'];?& amp; gt;"example data-href="yoursite.xyz/groomix/inde x.php"
Button style can be easy change using css, here
style="width:100px;height:30p x;displ ay:block"p>
Facebook will get your webpage content through following code added just before title tag
<!DOCTYPE html><html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:image" content="" />
<meta property="og:site_name" &n bsp; content="<?php echo $website_name;?>" />
<meta property="og:url" content="<?php echo 'http://'.$_SERVER['HTTP_HOST '].$_SERVER['REQUEST_URI'];?& gt;" />
<meta property="og:type" content="article" />
<meta property="og:title" content="<?php echo $page_title;?>" />
<meta property="og:description" content="<?php echo $page_desc;?>" />
<!--<meta property="fb:page_id" content="34497296301" />---> <!-- -----------------------Facebook sharing code start------------------------------------ ---->
<meta name="description" content="<?php echo $page_desc;?>"/>
<meta name="keywords" content="<?php echo $page_title.', '.$page_desc;?>" />
<title><?php echo $page_title;?></title>
Discussion (0)
No approved comments yet. Start a thoughtful discussion.
Sign in to comment.