Add URL back to og
parent
be06ad5c77
commit
93f3f02e73
|
|
@ -8,6 +8,7 @@ const calendarImageUrl = '/api2/cim/';
|
||||||
const eventUrl = '/api2/share/e';
|
const eventUrl = '/api2/share/e';
|
||||||
const sermonImageUrl = '/assets/images/tiny/facebookplay.png';
|
const sermonImageUrl = '/assets/images/tiny/facebookplay.png';
|
||||||
const sermonUrl = '/api2/share/s';
|
const sermonUrl = '/api2/share/s';
|
||||||
|
const otherUrl = '/api2/share/o';
|
||||||
|
|
||||||
|
|
||||||
router.get("/:shareCode",function(req,res){
|
router.get("/:shareCode",function(req,res){
|
||||||
|
|
@ -67,12 +68,13 @@ function getSermon(req, res, id){
|
||||||
function getOtherMeta(req, res, title, description, imageUrl, imageWidth, imageHeight, url) {
|
function getOtherMeta(req, res, title, description, imageUrl, imageWidth, imageHeight, url) {
|
||||||
imageWidth = imageWidth || 200;
|
imageWidth = imageWidth || 200;
|
||||||
imageHeight = imageHeight || 200;
|
imageHeight = imageHeight || 200;
|
||||||
|
url = req.protocol + '//' + req.hostname + otherUrl + encodeURIComponent(url);
|
||||||
var result = `<html>
|
var result = `<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Old Fashion Baptist Church</title>
|
<title>Old Fashion Baptist Church</title>
|
||||||
<!-- You can use Open Graph tags to customize link previews.
|
<!-- You can use Open Graph tags to customize link previews.
|
||||||
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
|
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
|
||||||
|
<meta property="og:url" content="`+ url +`"/>
|
||||||
<meta property="og:type" content="website" />
|
<meta property="og:type" content="website" />
|
||||||
<meta property="og:title" content="` + title + `" />
|
<meta property="og:title" content="` + title + `" />
|
||||||
<meta property="og:description" content="` + description + `" />
|
<meta property="og:description" content="` + description + `" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue