How to get device id for Audience Network of Facebook in Flutter?
Maybe you solved it but if anyone else looking for the solution:
Check the Logcat in android studio, you'll see a test device id. Also if you put your ad code like this it will also show test ad:
IMG_16_9_APP_INSTALL#YOUR_PLACEMENT_ID
kamranbekirovyz
Updated on December 18, 2022Comments
-
kamranbekirovyz over 1 year
Using facebook_audience_network package of flutter I tried to integrate audience network ads to my app. But as soon as I initialize my app I get this error:
Rewarded Ad: RewardedVideoAdResult.ERROR --> {error_message: No fill, error_code: 1001, invalidated: true, placement_id: YOUR_PLACEMENT_ID}
According to the package:
For testing purposes you need to obtain the hashed ID of your testing device. To obtain the hashed ID:
Call
FacebookAudienceNetwork.init()
during app initialization. Place the FacebookBannerAd widget in your app. Run the app. The hased id will be in printed to the logcat. Paste that onto thetestingId
parameter.FacebookAudienceNetwork.init( testingId: "37b1da9d-b48c-4103-a393-2e095e734bd6", );
I have no idea how to get device Id, while I use real device as an emulator.
Anyone who can help?