Site icon Hip-Hop Website Design and Development

How to product sync to Facebook when using Woocommerce Headless Nextjs? [closed]

I want to use Facebook for WooCommerce to sync the product to Facebook, to make ads.

I make woocommerce as my backend only. Frontend I using React.

Therefore I have the structure like this:

So I call to Woocommerce Rest Api to be used it in Frontend.

This working well so far. But right now I want to sync my product to Facebook using this woocommerce plugin.

Then I have this problem:

What I want:

What I have tried:

Go to Setting > General -> Site Address (URL) -> Change this field to mysite.com

But this cause me another problem which is: Now I unable to call the Rest Api from frontend.

Over here have a question which almost same like mine: https://wordpress.org/support/topic/using-woocommerce-rest-api-with-gatsby/
But I dont know how to use facebook_for_woocommerce_integration_prepare_product in order to suit my needs.

Someone please help in order to point me to right direction.