You have to supply the entirety of the opengraph data. For sites like X (Twitter) you're also going to need to use twitter cards data. Below is an example that more closely matches CB SEO output.
Global
Triggers: activity_onDisplayActivity
Type: Code
User: Automatic
Access: Everybody
Conditions
Field: Value
Custom Value: [var3_isRow]
Operator: Equal To
Value: 1
Action
Method: Header
Code:
Code:
<meta property="og:type" content="website" />
<meta property="og:site_name" content="[cb:parse function="encode" method="html"][cb:config param="sitename" /][/cb:parse]" />
<meta property="og:title" content="[cb:parse function="encode" method="html"][username][/cb:parse]" />
<meta property="og:description" content="[cb:parse function="encode" method="html"][cb:parse function="getNotificationTitle" class="var2" /][/cb:parse]" />
<meta property="og:image" content="[cb:parse function="encode" method="html"][avatar][/cb:parse]" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:title" content="[cb:parse function="encode" method="html"][username][/cb:parse]" />
<meta property="twitter:description" content="[cb:parse function="encode" method="html"][cb:parse function="getNotificationTitle" class="var2" /][/cb:parse]" />
<meta property="twitter:image" content="[cb:parse function="encode" method="html"][avatar][/cb:parse]" />
Parameters
Format Functions: Yes
Posts don't really have titles and getting the contents of the post is complicated. getNotificationTitle is an amalgamation of post title and message that's safe for sharing and has been processed. With the above example it sets the opengraph title to the username and the description to the getNotificationTitle result. It's important to use the html encoding format function to apply htmlspecialchars to the results of substitutions or you could insert broken html. Image is just set to avatar.
The above also sets this same information into twitter card metadata since CB SEO also does this automatically.
If you need this to be tailored to specific activity posts it will get complicated. You'll need to use IF substitutions and probably have to utilize PHP to get whatever information you're needing. However since the URL is to a post and not the article in the post the above metadata would be accurate for such a URL.
Note this doesn't guarantee a site will even parse this though. It will be inserted to the header as specified, but applications and other websites do not have to use this metadata.