-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send multiple content_ids? #40
Comments
Interesting. So how did it go when you built the string yourself with the correct single-quotes etc then sent that in as the string argument for ContentId? |
Well, I will tell you more details... I tried something like this:
it does logged in Test Events because I track the code and found that the Facebook Android SDK (AppEvent.java) is throwing an exception for datatypes other than String and Number: as mentioned here https://developers.facebook.com/docs/app-events/getting-started-app-events-android Honestly, I'm a little bit confuse with the documentation. It says here https://www.facebook.com/business/help/892811264497819 that the required app events for Dynamic Ads are: My app can purchased more than one item at once, so it has multiple contentID. But, the SDK is not allowing us to send an array. In Facebook Commerce Manager, my Retargeted Ads is 0%: In How to Fix it section, I just did the number one solution and waiting for the result for single contentID. I already make sure everything in the screenshot above. Now I scroll down and come to this part: or you can read it from this https://business.facebook.com/business/help/644889989181423?id=725943027795860 it's exactly the same. It said "website", now I may change the question, is multiple contentID only possible for website (for now)? Because the article said that we need to send |
Should maybe be
(note the single-quotes - to match what they request, I think) Honestly this is way out of my depth, but it still seems like the content ids are not sent exactly as they expect, with each id being a number inside single quotes, with multiple ids separated by commas |
I already done that. But it turns out even a single id doesn't match too. I already follow the instruction in this library, Event Manager received all of my events. I also made some catalog, input the products and write down the I can't figure out what's wrong because l just follow the instruction to initializedSDK and then we good to go. I just need AppEvent feature for Fb Pixel and from this example https://github.com/thebergamo/react-native-fbsdk-next#app-events-1 there's no other setup. So, I don't know what's wrong? Do you have any reference or can you confirm that this is only happens to me and the others app works fine? |
This is not a use case for me so I have never coded to these APIs or used them and am not planning too - which means unfortunately I think I've helped you as much as I can |
Anyway, I solved this recently... As I mention above, I send the event like this:
But then I tried to send a minimum parameters as the facebook documentation said and modify my code:
And it finally works, the data now can be retargeted. I have 2 suspects, but I don't have any prove yet:
But I guess suspect number 2 is the real problem since they mention in the documentation to send contentID in single quote. But what makes me confuse is the documentation give me an example how to write In conclusion, the solution for me to send single or multiple contentID for Dynamic Ads for Mobile Apps is to send a minimum parameters just like the example in documentation. For my case in retail/e-Commerce, I follow this: https://developers.facebook.com/docs/app-events/best-practices/ecom-and-retail |
🐛 Bug Report
I check in
node_modules/react-native-fbsdk-next/types/FBAppEventsLogger.d.ts
that AppEventParam can only send a single ContentID as a StringI want to use Dynamic Ads... According to this https://business.facebook.com/business/help/606577526529702?id=1205376682832142 I need to send
content_ids
which can be a single content ID or an array of content IDsAnd the problem is I can never send an array at all. I use Test Events in Pixels Event Manager to get realtime log. Every time I send an array, VIewItem Event or any other events is not logged.
This picture shows the wrong format. So,
JSON.stringify
is not a workaround for this.To Reproduce
Expected Behavior
This library can send an array data type
Environment
"react": "16.9.0",
"react-native": "0.61.1",
"react-native-fbsdk-next": "^4.2.0",
The text was updated successfully, but these errors were encountered: