1

Below is the Html I'm using in My SharePoint Page to SharePoint Page on Facebook.

  <!-- Facebook -->
<a href="http://www.facebook.com/sharer/sharer.php?u=http://SharePointSite/Pages/default.aspx" target="_blank" class="share-btn facebook">
        <i class="fa fa-facebook"></i> <span>SHARE</span>
    </a>

While click on Facebook Share button it will display like this.

enter image description here

But I want to show the Image from SharePoint Page content.

If you see the above html there is URL parameter in the anchor tag u=http://SharePointSite/Pages/default.aspx which is the SharePoint page URL.

So is there any trick to Show our custom Image.

1

This post is a litle old, but you Facebook uses the open graph protocol.

In the head section of your master page, you can add attributes about your site including what image to show.

    <meta property="og:type" content="website">
    <meta property="og:url" content="http://yoursite.com">
    <meta property="og:title" content="Awesome Website">
    <meta property="og:site_name" content="Awesome website">
    <meta property="og:image" content="https://yoursite.com/images/image.jpg">
    <meta property="og:image:width" content="468" />
    <meta property="og:image:height" content="200" />
    <meta property="og:description" content="Come check out our site">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.