Add URL back to og

test
dan 2020-03-29 21:08:25 -06:00
parent be06ad5c77
commit 93f3f02e73
1 changed files with 3 additions and 1 deletions

View File

@ -8,6 +8,7 @@ const calendarImageUrl = '/api2/cim/';
const eventUrl = '/api2/share/e';
const sermonImageUrl = '/assets/images/tiny/facebookplay.png';
const sermonUrl = '/api2/share/s';
const otherUrl = '/api2/share/o';
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) {
imageWidth = imageWidth || 200;
imageHeight = imageHeight || 200;
url = req.protocol + '//' + req.hostname + otherUrl + encodeURIComponent(url);
var result = `<html>
<head>
<title>Old Fashion Baptist Church</title>
<!-- You can use Open Graph tags to customize link previews.
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
<meta property="og:url" content="`+ url +`"/>
<meta property="og:type" content="website" />
<meta property="og:title" content="` + title + `" />
<meta property="og:description" content="` + description + `" />