Summary
Implement the LinkedIn social platform adapter for Company Page analytics.
API Limitations
LinkedIn has no public search API for brand mentions. This adapter is scoped to Company Page analytics only:
- Post engagement metrics (impressions, clicks, shares, comments)
- Follower count and growth
- Comment text on company posts (for sentiment analysis)
This does NOT search all of LinkedIn for brand mentions — only your own page's data.
API Details
- Auth: OAuth 2.0 3-legged flow, requires Company Page admin approval
- Endpoints: Marketing API (
/organizationalEntityShareStatistics, /organizationPageStatistics)
- Rate limits: 100 calls/day for most endpoints
- Cost: Free (but requires LinkedIn app registration and page admin)
Data extracted
Company post text, impressions, clicks, engagement rate, shares, comments, comment text, follower count delta.
Package structure
packages/social-linkedin/
src/adapter.ts -- implements SocialPlatformAdapter
src/normalize.ts -- LinkedIn API → SocialMentionResult[]
src/types.ts -- LinkedIn API response types
src/oauth.ts -- 3-legged OAuth flow
src/index.ts
test/index.test.ts
package.json -- @ainyc/canonry-social-linkedin
UX Considerations
- Clearly document that this covers Company Page analytics only, not mention search
- OAuth flow needs callback URL handling (similar to existing Google OAuth in
packages/api-routes/src/google.ts)
- Consider adding a "LinkedIn limitations" note in the UI settings card
Depends on
Acceptance Criteria
Summary
Implement the LinkedIn social platform adapter for Company Page analytics.
API Limitations
LinkedIn has no public search API for brand mentions. This adapter is scoped to Company Page analytics only:
This does NOT search all of LinkedIn for brand mentions — only your own page's data.
API Details
/organizationalEntityShareStatistics,/organizationPageStatistics)Data extracted
Company post text, impressions, clicks, engagement rate, shares, comments, comment text, follower count delta.
Package structure
UX Considerations
packages/api-routes/src/google.ts)Depends on
Acceptance Criteria