Uptoolkit
GitHub

Social Networks

Social network platform definitions, URL helpers, and sample profile links.

Detect LinkedIn
linkedin
Facebook URL
https://www.facebook.com/mira.halvorsen
Grok URL
https://grok.com/@mira_maps

Installation

npx shadcn@latest add https://ui.uptoolkit.com/r/social-networks.json

Usage

Platform metadata and URL helpers for external social profiles. Built-in support for Facebook, LinkedIn, and Grok, with room to extend the registry at runtime.

import {
  buildSocialNetworkUrl,
  detectSocialNetwork,
  getProfileUsername,
  socialProfilesFromPropertyValues,
} from "@/lib/social-networks";

detectSocialNetwork("https://www.linkedin.com/in/ada"); // "linkedin"
buildSocialNetworkUrl("grok", "@mira_maps"); // "https://grok.com/@mira_maps"
socialProfilesFromPropertyValues(actor.attachment ?? []);

SocialNetworkProfile is the data contract consumed by social-network-link and user-social-networks. Pass verified: true when a link has been confirmed, matching Mastodon's verifiedAt on PropertyValue rows.