No internet connection
  1. Home
  2. Ideas

Sharing to Social Media

By Cody @codywarmbo2018-08-18 15:18:44.844Z

Currently when sharing any forum post to a social media site like Facebook, no opengraph info is shown or pulled. Is this by design? Can we force meta info?

  • 2 replies
  1. KajMagnus @KajMagnus2018-08-22 12:12:08.871Z

    Am I understanding correctly, that you want to add OpenGraph related tags to the <html><head>?

    You can add head tags, by adding <head>...</head> to the very top of a Talkyard page, example:

    <head>
    <title>Page title</title>
    <meta name="description" content="Page description ...">
    <meta property="og:title" content="Page title" />
    </head>
    
    And here goes the page text, as usual. This'll be inserted into the correct <body><div ...><div...><article><div ...> tag.
    

    Only certain tags are considered, namely <title> and <meta>, and only some attributes, namely property, content and name — and that's all that's needed, for OpenGraph?

    (Note to self: Here's the code: https://github.com/debiki/talkyard/blob/e58e..../app/debiki/ReactJson.scala#L1102)

    You'd do this "manually" (i.e. type <head><meta ...>) for each page. Is that an okay approach? Or would you prefer something more automatic somehow, and how would that work and what would it do :- )

    1. CCody @codywarmbo2018-08-24 23:46:12.315Z

      It would be nice if when sharing a forum topic the title of that topic is used for the og:title and the author of the topic is listed as well.