Introducing the Social SDK

Greg

You can now query any address's on-chain social profiles using the new social extension in the thirdweb SDK.

import { getSocialProfiles } from "thirdweb/social";
const profiles = await getSocialProfiles({
address: "0x...",
client,
});

The query will return an array of SocialProfile objects for each profile the address is associated with. This type has a standardized top-level interface of type (farcaster, lens, and ens are currently supported), name, bio, and avatar. You can access protocol-specific user information such as the Farcaster FID under the metadata field.

[
{
"type": "ens",
"name": "joenrv.eth",
"avatar": "ipfs://bafybeic2wvtpv5hpdyeuy6o77yd5fp2ndfygppd6drdxvtfd2jouijn72m",
"metadata": {
"name": "joenrv.eth"
}
},
{
"type": "farcaster",
"name": "joaquim",
"bio": "Eng Lead @ thirdweb",
"avatar": "https://lh3.googleusercontent.com/EUELPFJzdDNcc3qSaEMekh0_W16acnS8MSvWizt-7HPaQhfJsNFC5HA0W4NKcy6CN9zmV7d4Crqg2B8qM9BpiveqVTl2GPBQ16Ax2IQ",
"metadata": {
"fid": 2735,
"bio": "Eng Lead @ thirdweb",
"pfp": "https://lh3.googleusercontent.com/EUELPFJzdDNcc3qSaEMekh0_W16acnS8MSvWizt-7HPaQhfJsNFC5HA0W4NKcy6CN9zmV7d4Crqg2B8qM9BpiveqVTl2GPBQ16Ax2IQ",
"username": "joaquim",
"addresses": [
"0x2247d5d238d0f9d37184d8332ae0289d1ad9991b",
"0xf7970369310b541b8a84086c8c1c81d3beb85e0e"
]
}
},
{
"type": "lens",
"name": "joaquim",
"bio": "Lead engineer @thirdweb",
"avatar": "https://ik.imagekit.io/lens/media-snapshot/557708cc7581172234133c10d473058ace362c5f547fa86cee5be2abe1478e5b.png",
"metadata": {
"name": "joaquim",
"bio": "Lead engineer @thirdweb",
"picture": "https://ik.imagekit.io/lens/media-snapshot/557708cc7581172234133c10d473058ace362c5f547fa86cee5be2abe1478e5b.png"
}
}
]

You can access the same query via the prebuilt React Query hook useSocialProfiles.

import { useSocialProfiles } from "thirdweb/react";
const { data: profiles } = useSocialProfiles({
client,
address: "0x...",
});
⚠️
The SDK's new social features are still in beta, and may have breaking changes in the coming weeks.

The Connect Button

Our ConnectButton component in both React and React Native uses the social SDK to display a users profile rather than their wallet address when available.

Bug Fixes and Other Improvements

  • Modular Contract Support - Learn more
  • Added test mode to Pay options on ConnectButton - Learn more
  • Added getOwnedTokenIds to ERC1155 extension - Learn more
  • Added options to hide Buy, Send, and Receive buttons in useWalletDetailsModal - Learn more
  • Fixed base URI extraction logic in contract extensions
  • Fixed function ID retrieval for contract extensions
  • Improved React Query caching performance