[Solved] Facebook Playable Ads CTA?

Ad

Hi, facebook playable ads require me to add a function call FbPlayableAd.onCTAClick()

Where can I find this in GDevelop? Thanks

Call To Action Playable Asset FB

I got it working now with adding a Javascript code attached to a button press.

2020-03-28%2014_23_10-StrokesPlus

The problem I have now is that it’s saying the class is undefined. Help?

2020-03-28%2014_23_19-StrokesPlus

When I upload in the playable asset, it’s now saying unknown error.

image

code in JSevent are in strict mode, try to force use global scope with window.

define a function in window, and call it.
Think to add once condition with cursor conditions, because all event in the eventsheet are call once per frame, so in your case if you don’t add once condition, you will trigger loooooooooooooot of time the JSevent

Yes, got it working with this. javascript - SDK for Facebook playable ads - Stack Overflow

image

You’re right it was blasting calls without the once condition.

1 Like