meta sdk capacitor
npm install capacitor-meta-sdk
npx cap sync- Add the following meta-data entries to your Android Manifest file (
android/app/src/main/AndroidManifest.xml) inside the<application>tag:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>- Add the Facebook App ID and Client Token to your strings.xml file (
android/app/src/main/res/values/strings.xml):
<string name="facebook_app_id">YOUR_FACEBOOK_APP_ID</string>
<string name="facebook_client_token">YOUR_FACEBOOK_CLIENT_TOKEN</string>For iOS configuration, add your Facebook App ID to your Info.plist file:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>Facebook</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fbYOUR_FACEBOOK_APP_ID</string>
</array>
</dict>
</array>
<key>FacebookAppID</key>
<string>YOUR_FACEBOOK_APP_ID</string>
<key>FacebookClientToken</key>
<string>YOUR_FACEBOOK_CLIENT_TOKEN</string>
<key>FacebookDisplayName</key>
<string>YourAppName</string>Note: Replace the App ID and Client Token with your actual Facebook App credentials from the Facebook Developer Console.
logEvent(options: { eventName: string; eventValues?: Record<string, any>; }) => Promise<void>| Param | Type |
|---|---|
options |
{ eventName: string; eventValues?: Record<string, any>; } |
Construct a type with a set of properties K of type T
{
[P in K]: T;
}