Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.
Hi everyone,
I am in the process of adding some social media share buttons to a mashup page, but have found an issue that seems to relate to the node.js web server.
In order to share pages correctly, including an image, title and description, you need to use opengraph meta tags like these:-
<meta property="og:image" content="https://......" />
<meta property="og:image:secure_url" content="https://......" />
<meta name="robots" content="follow, index" />
<meta property="og:site_name" content="Company name - Site name" />
<meta property="og:title" content="Page title" />
<meta property="og:description" content="Page description" />
<meta property="og:url" content="https://......" />
<meta property="og:type" content="website" />
<meta property="og:image:width" content="1280" />
<meta property="og:image:height" content="640" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="https://..." />
<meta name="twitter:image" content="https://..." />
<meta property="twitter:site" content="@tbc" />
Twitter, Facebook, etc. then use these tags to define the share correctly
The share buttons are defined as follows:
<li class="">
<a class="wtShare wtSocialNetworkLink wt_twitter" href="https://twitter.com/intent/tweet?url=https%3A%2F%2F......&text=some text" tabindex="0" rel="noopener noreferrer" title="Twitter" style="cursor: pointer;">
Twitter
</a>
</li>
<li class="">
<a class="wtShare wtSocialNetworkLink wt_facebook" href="http://www.facebook.com/share.php?u=https%3A%2F%2F......&t=some text" tabindex="0" rel="noopener noreferrer" title="Facebook" style="cursor: pointer;">
Facebook
</a>
</li>
Unfortunately, this does not work when the page is within a mashup on our Qlik Enterprise server, and when I look at the Facebook for developers site, I can see a CURL error: 28 (OPERATION_TIMEOUTED)
My colleague tried curl from his Linux laptop and did not receive any errors, however.
As a plan B, we copied the page from the mashup and placed it under IIS on the same server and it worked fine (both Twitter and Facebook shares were generated as expected, using the meta tag information on the page, including the image), so I assume that the issue is related to the node.js web server on which the mashups run.
The only post that I could find anywhere (other than those related to Wordpress) talked about the connection being refused. However, we could not find anything in the logs.
We are using Qlik Sense Enterprise May 2021 Patch 5 on an Azure server.
Any help would be gratefully received.
Richard
Although we are still having issues with our LinkedIn button, the Twitter and Facebook buttons are now working. It's difficult to say why, given that we also upgraded to Qlik Sense May 2021 on Friday (caching? new version?).
I'll keep this post open while we look at the LinkedIn issue. In the meantime, if anyone has any ideas, please feel free to contribute.