Integration Examples & Tutorials
This section provides hands-on examples of how to leverage OmniSocial’s identity, governance, and social modules in your own decentralized apps, bots, or dashboards.
Each tutorial is concise, code-driven, and designed to get you building fast.
📛 Using OmniSocial Identity in Your dApp
Goal: Fetch a user's active
PersonaNFTand reputation in specific domains using GraphQL.
Tools: GraphQL, Apollo Client (or fetch), PersonaID or .omni domain.
# Get active persona and rep
query GetUserIdentityAndRep($wallet: String!) {
wallet(id: $wallet) {
activePersona {
id
handle
label
}
reputations {
domain
score
}
}
}Example output:
✅ You can use this to display identity cards, rank users, or gate content by rep level.
📰 Building a Custom Feed Reader
Goal: Render a custom feed of posts by a specific user or tag using OmniSocial’s subgraph.
React Example (using Apollo):
✅ Extend this to show followers-only feeds, tags, or time filters.
🗳 Writing a Governance Proposal Script
Goal: Programmatically create a proposal using ethers.js and
DAOcontract ABI.
Setup:
Example Script:
✅ Add this to a governance dashboard or auto-proposal system.
🧠 Use Reputation to Gate Content
Goal: Only allow users with sufficient rep to unlock premium posts.
Frontend Check:
✅ Combine with PersonaNFT and RepModule for dynamic access control
Last updated
Was this helpful?
