You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually I am facing the problem regarding the social links after downloading the vcard file just because it's not showing the social links in my vcard after download.
Here is the code:
var vCardsJS = require('vcards-js');
//create a new vCard
var vCard = vCardsJS();
I did find a solution, but it is a bit of a workaround. I did some research on VCF formatting conventions and created the following edit to the vCardFormatter.js file which produces the desired effect:
if (vCard.socialUrls) {
for (var key in vCard.socialUrls) {
index++;
if (vCard.socialUrls.hasOwnProperty(key) &&
vCard.socialUrls[key]) {
formattedVCardString += 'item' + index + '.URL:' + vCard.socialUrls[key] + nl();
formattedVCardString += 'item' + index + '.X-ABLabel:' + key + nl();
// formattedVCardString += 'X-SOCIALPROFILE' + encodingPrefix + ';type=' + key + ':' + e(vCard.socialUrls[key]) + nl();
}
}
}
Actually I am facing the problem regarding the social links after downloading the vcard file just because it's not showing the social links in my vcard after download.
Here is the code:
var vCardsJS = require('vcards-js');
//create a new vCard
var vCard = vCardsJS();
//set properties
vCard.firstName = name;
vCard.organization = companyName;
vCard.workPhone = phone;
vCard.url = website;
vCard.workEmail = email;
vCard.socialUrls['facebook'] = facebook;
vCard.socialUrls['instagram'] = instagram;
vCard.socialUrls['twitter'] = twitter;
vCard.socialUrls['youtube'] = youtube;
vCard.socialUrls['snapchat'] = snapchat;
vCard.socialUrls['tiktok'] = tiktok;
vCard.socialUrls['whatsapp'] = whatsapp;
vCard.socialUrls['pinterest'] = pinterest;
let card = await vCard.getFormattedString();
Links are coming from my site front-end.
The text was updated successfully, but these errors were encountered: