Flutterflow Meta SDK

Best Practices

Web:

<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '[META_PIXEL_ID]');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=[META_PIXEL_ID]&ev=PageView&noscript=1"
/></noscript>

Native:

You can need use: https://pub.dev/packages/flutter_meta_sdk

Project Dependencies

flutter_meta_sdk: ^1.0.5

ConfigFiles

<meta-data 
    android:name="com.facebook.sdk.ApplicationId" 
    android:value="[APP_ID]"/>
<meta-data 
    android:name="com.facebook.sdk.ClientToken" 
    android:value="[CLIENT_TOKEN]"/>

<key>FacebookAppID</key>
    <string>[APP_ID]</string>
    <key>FacebookClientToken</key>
    <string>[CLIENT_TOKEN]</string>
    <key>FacebookDisplayName</key>
    <string>[NOMBRE_APP]</string>
        <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLName</key>
        <string>metapixel.com</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>metapixel</string>
        </array>
      </dict>
      <dict>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>fb[APP_ID]</string>
        </array>
      </dict>
    </array>

2
2 replies