Trouble translating cURL into Bubble

Hey there y’all!

After about two weeks browsing the forums, reading the Facebook developer guides, watching webinars, I am stuck. So here I am!

I’m trying to add this call to the api connector:

curl -G
–data-urlencode ‘targeting_spec={
“geo_locations”: {“countries”:[“US”,“GB”]},
“publisher_platforms”: [“instagram”],
“user_os”: [“iOS”]
}’
-d ‘optimize_for=IMPRESSIONS’
-d ‘access_token=<ACCESS_TOKEN>’
https://graph.facebook.com/v10.0/act_<AD_ACCOUNT_ID>/reachestimate

I’ve tried to reverse engineer some of the facebook plugins on the market, but I’m missing something. Authentication, works. No issues there. I’m having issues getting my head around the actual architecture of the call itself within bubble. I’m unsure what I should be putting in the “key” space, I understand that the “value” space is going to be the parameters I’m trying to send to the reach estimate api. Within my app, the user selects a list of celebrities and then that list is a comma separated list attached to their account. I’ve got that stored as plaintext but I could easily make it go back to JSON if that’s what I’m missing.

Basically, what I’m asking is if we take this list of celebrities, how do I make sure that when the user hits search, that list is then sent as a request to this api? I know I’m missing something super simple here, but I have not had any luck getting this to return a reach estimate since according to Facebook, ‘Parameter is empty, and parameter is required.’

Any help would be greatly appreciated, sorry for the noob question.

Solved! Very noob move on my part. I thought that the value portion had to be blank in order to be dynamic. This is not the case. Also, translating CURL into Bubble just isn’t a thing. You basically have to rebuild the call for Bubble using Bubble’s method. In this case it was hacking together the proper URL and then adding the right brackets to make it recognize the parameters. There’s probably a better way to build calls but this is my first rodeo so that’s how I’m doing it for now.