Overview of react-facebook features
mainreact-facebook is a unified, TypeScript-first, and SSR-safe package for integrating the Facebook platform into React applications. It is designed to work with Next.js and includes built-in support for common Facebook features.
Key Capabilities
| Feature | Implementation |
|---|---|
| Login & Logout | <Login>, useLogin |
| Pixel Tracking | usePixel, usePageView, ReactPixel |
| Graph API | useGraphAPI (with typed responses) |
| Social Plugins | Like, Share, Comments, Page, Embeds |
| SSR / Next.js | 'use client' directives, window guards |
| Error Handling | FacebookErrorBoundary (for ad blockers) |
| GDPR Consent | grantConsent / revokeConsent |
| i18n | useLocale for dynamic locale switching |
| Bundle Size | Tree-shakeable, < 15 KB gzipped |