-3

I´m trying to import data from Facebook mkt api into google sheets, however, there are some URL that seem to be working properly but there are others in which it returns the error of "Exception: Invalid argument:"

The URL that works is this one: https://graph.facebook.com/v9.0/act_57968134*****?access_token=***********

The URL that doesnt work is this one: https://graph.facebook.com/v9.0/act_57968134****?fields=campaigns{name}&access_token=***********

enter image description here

Does anybody know why this is happening? I tried other codes that I found in github but it´s the same, there is a problem with that specific URL...

Thank you a lot

  • Have you tried using filtering the ````campaigns```` parameter and using ````JSON.stringify````? You can refer to this post for more information: https://stackoverflow.com/questions/58658777/facebook-graph-api-not-working-on-urlfetchapp – CMB Jan 25 '21 at 16:56
  • This probably needs proper URL encoding of the special characters { and }. – CBroe Jan 26 '21 at 07:46

1 Answers1

1

Thanks to Carlos M found the answer! Facebook Graph API not working on UrlFetchApp