2

I have a website and I want to users to be able to share some content from my website to other apps such as facebook, slack, etc. The share is a link points to an image in my website. How can I customize the shared content shown no the apps? For example, I'd like to show an image with a text as its title on slack rather than a weird long link URL?

Adil B
  • 14,635
  • 11
  • 60
  • 78
Joey Yi Zhao
  • 37,514
  • 71
  • 268
  • 523

1 Answers1

0

As pointed out in the comments this works by including special meta tags in the header of your HTML page. It is called Open Graph protocol and both Slack and Facebook support it.

When you then add your URL it will be unfurled to show the content you specified like a specific title, image, description, etc.

Example from one of my websites:

<!DOCTYPE html>
    <html lang="en">
    <head>                      
        <meta property="og:type" content="website">         
        <meta property="og:site_name" content="EVE Info" />
        <meta property="og:title" content="Rosie Dunbar | Character" />
        <meta property="og:description" content="Rosie Dunbar | Ishikawa Corporation | -0.3" />
        <meta property="og:image" content="https://imageserver.eveonline.com/Character/2112668467_128.jpg" />
Erik Kalkoken
  • 30,467
  • 8
  • 79
  • 114