‘mbd Use Case: Facebook Ads for Web3 Social
Invalid Date
Overview
Facebook ads are paid posts that businesses can use to promote their products or services to Facebook users. They can appear in various formats, such as images, videos, or carousels, and can be shown throughout the app, including in users' feeds, Stories, Messenger, and Marketplace. Today in Web3 Social, there has not been any products that have matched the impact of Facebook ads today. Phala changes this narrative with a use case that makes Facebook ads in Web3 Social possible via ‘mbd’s specialized AI model trained on Farcaster data.
‘mbd
'mbd offers composable and simple to use AI models in everyone's hands. They are powerful and tailored to elevate the best of what Decentralized Social Media has to offer. This is possible because conversations are happening in a distributed manner for the first time online, like they are supposed to be. Pioneers are building social-native apps together on the same shared human layer. Users interact with mini-apps, read articles, join events, collect NFTs, launch projects, and trade memes, all within their social feeds. We are proud to support Web3 builders that continue to push the boundaries of the new internet.
‘mbd Integration
The ‘mbd AI Agent Contract template is easy to get started on. Go sign up for an account on https://mbd.xyz to get an API Key then you can start interacting with the ‘mbd API in a few lines of code in seconds. Here is a simple “hello world” API call we provide in the AI Agent Contract Template.
const response = await fetch('https://api.mbd.xyz/v1/farcaster/casts/feed/for-you', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'X-Api-Key': `${mbdApiKey}`,
},
body: JSON.stringify(body)
});
Generate AI Labels for Your Web3 Social Ads
With the ability to connect to ‘mbd’s API, we can now start to build out a feature for the Web3 Social ad. In this example, we will generate AI labels based on a title and description of the ad being created. With a few lines of code, we are able to generate a list of labels to us in our application.
const response = await fetch(
"https://api.mbd.xyz/v1/farcaster/casts/labels/for-text",
{
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json",
"X-Api-Key": `MBD-API-KEY`,
},
body: JSON.stringify({
text_inputs: [JSON.stringify(body)],
label_category: "topics",
}),
}
);
Now we can visualize what this process looks like in the front end when a user generates the top 5 labels based on the title and description submitted by the user. As you can see the labels generated from the title “ETHCC” and Description “Join the largest web3 conference in 2024” are science_technology, business_entrepreneurs, news_social_concern, learning_educational, and other_hobbies
.

Conclusion
With Phala’s AI Agent Contract integration with ‘mbd’s specialized AI model, developers can now start building out Web3 Social applications that can meet the impact that Facebook ads has made in the Web2 industry. We urge you to explore further into ‘mbd’s API, and start building out the future of Web3 Social applications.
For more detailed information and to start building: