Overview
This demo application showcases FlyWhale's integration with Meta (Instagram Graph API + Marketing API) and TikTok (Login Kit + Ad Library API + Business API). Each demo flow guides you through the OAuth authentication process and demonstrates real API calls with actual data.
OAuth Authentication
Click "Connect Meta" to initiate OAuth flow. You'll be redirected to Facebook Login where you'll grant permissions for the requested scopes.
Account Discovery
Uses pages_show_list scope to discover Facebook Pages and linked Instagram Business accounts.
Instagram Insights
Uses instagram_manage_insights to fetch account-level metrics like reach, impressions, and profile views.
Media List
Uses instagram_basic to list recent Instagram posts with engagement metrics.
Ads Insights
Uses ads_read to fetch Marketing API performance data from connected ad accounts.
Prerequisites
- A Facebook Page linked to an Instagram Business/Creator account
- Admin access to the Facebook Page
- Optional: Access to a Facebook Ad Account for Marketing API demo
Login Kit OAuth
Click "Connect TikTok" to initiate Login Kit OAuth. Grants access to user profile, videos, and ad library research scopes.
User Profile
Uses user.info.basic to fetch display name, avatar, follower/following counts, and verification status.
Video List
Uses video.list to list user's TikTok videos with view counts, likes, and engagement metrics.
Public Ad Library
Uses research.adlib.basic to search and view publicly available TikTok ads and their performance ranges.
Business API (Optional)
Separate OAuth for TikTok Business API to access your own advertiser accounts and reporting data.
Prerequisites
- A TikTok account with at least one public video
- Optional: TikTok Business Center account for Business API demo
OAuth Error: Invalid redirect URI
Ensure the redirect URI in the app settings matches exactly:https://demo.flywhale.io/api/auth/[provider]/callback
No Instagram accounts found
Make sure your Facebook Page has an Instagram Business or Creator account linked in Meta Business Suite.
Token expired
Click "Reset Demo" to clear stored tokens and re-authenticate.
No ad accounts found
The authenticated user must have access to at least one ad account in Meta Business Suite or TikTok Business Center.
Meta API Demo
~2 minutes
OAuth + 5 API demonstration steps
TikTok API Demo
~2 minutes
OAuth + 4-6 API demonstration steps