.fb-like-container p font-size: 1.1rem; color: #4a627a; margin-bottom: 1.5rem;
.fb-highres-badge max-width: 200px;
/* Mobile adjustments */ @media (max-width: 600px) .facebook-like-section padding: 2rem 1rem; margin: 1rem;
| Asset | Resolution / Format | Purpose | |-------|---------------------|---------| | og:image | 1200×630px, 72 DPI | High-res link preview when shared | | fb-highres-badge.png | 600×200px (base) + @2x 1200×400px | Retina-ready custom badge | | Facebook Like button | Uses data-size="large" | Larger, touch-friendly button | Here is a complete, self-contained index.html : like us on facebook high resolution
.fb-like-container p font-size: 1.1rem; color: #4a627a; margin-bottom: 1.5rem;
.fb-highres-badge max-width: 280px; width: 100%; height: auto; margin-bottom: 1.5rem;
Place these in the <head> of your HTML. They control how your page appears when someone clicks "Like" or shares it. <script> window
.fb-like-container h2 font-size: 2rem; font-weight: 600; margin-bottom: 0.5rem; color: #1b2a3e;
<!-- High-res retina badge --> <img src="https://placehold.co/600x200/1877F2/white?text=Like+us+on+Facebook" srcset="https://placehold.co/600x200/1877F2/white?text=Like+us+on+Facebook 1x, https://placehold.co/1200x400/1877F2/white?text=Like+us+on+Facebook+HD 2x" alt="Like us on Facebook" class="fb-highres-badge" width="300" height="auto" />
@media (max-width: 600px) .facebook-like-section padding: 2rem 1rem; margin: 1rem; .fb-like-container h2 font-size: 1.5rem; .fb-like-container p font-size: 1rem; .fb-highres-badge max-width: 200px; Recommended format: JPG or PNG, < 8 MB
Place this right before the closing </body> tag.
<script> window.fbAsyncInit = function() FB.init( appId : 'YOUR_APP_ID', // Optional, can be empty or use a test app cookie : true, xfbml : true, version : 'v18.0' ); ; (function(d, s, id) var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v18.0"; fjs.parentNode.insertBefore(js, fjs); (document, 'script', 'facebook-jssdk')); </script> Replace YOUR_APP_ID with a valid Facebook App ID (you can create one for free at developers.facebook.com). If you don't have one, you may omit appId and just keep xfbml: true . To ensure the "Like" button and preview are truly high-res:
<meta property="og:title" content="Like Us on Facebook" /> <meta property="og:description" content="Join our community for updates, news, and exclusive content." /> <meta property="og:image" content="https://yourdomain.com/images/high-res-fb-preview.jpg" /> <meta property="og:image:width" content="1200" /> <meta property="og:image:height" content="630" /> <meta property="og:url" content="https://yourdomain.com/like-page" /> <meta property="og:type" content="website" /> Use an image at least 1200×630 pixels for a high-resolution link preview. Recommended format: JPG or PNG, < 8 MB. 2. HTML Structure (Responsive & High-Res Ready) <section class="facebook-like-section"> <div class="fb-like-container"> <h2>📱 Stay Connected</h2> <p>Like us on Facebook for the latest news, offers, and live updates.</p> <!-- High-res logo / badge (optional) --> <img src="assets/fb-highres-badge.png" srcset="assets/fb-highres-badge.png 1x, assets/fb-highres-badge@2x.png 2x" alt="Like us on Facebook" class="fb-highres-badge" width="300" height="auto" />
<!-- Facebook Like Button (iframe) --> <div class="fb-like" data-href="https://www.facebook.com/YourPageName" data-width="450" data-layout="standard" data-action="like" data-size="large" data-share="true"> </div> </div> </section> Replace YourPageName with your actual Facebook page username or ID. /* Facebook Like Section */ .facebook-like-section background: linear-gradient(135deg, #f5f7fa 0%, #e9edf2 100%); padding: 3rem 1rem; text-align: center; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; border-radius: 16px; margin: 2rem auto; max-width: 800px; box-shadow: 0 8px 20px rgba(0,0,0,0.05);