Agent detection

By "agent" we mean the social platform (or web crawler) you images are being rendered on. You can render custom templates depending on the platform your links are being shared.

multiple agents demo

Usage#

To detect the agents on your templates grab the agent prop and get the name via agent.name.

templates/main.js
import React from "react";
export default function MainTemplate({ agent, variables }) {
if (agent.name === "whatsapp") {
return <WhatsappComponent variables={variables} />
}
// ... default component ...
}

Agent list#

Some agents are (but not limited to):

NameValue
Facebookfacebook
Twittertwitter
WhatsAppwhatsapp
Instagraminstagram
LinkedInlinkedin
Redditreddit
Googlegoogle
Pinterestpinterest
Telegramtelegram
Slackslack