You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.
I'm trying to us the fbad_get_search function to get the id of certain behaviors within Facebook API. I can do this easily for type='adinterest', but I cannot figure out the appropriate syntax nor could I find any examples that illustrate how to use the fbad_get_search function when the type='adTargetingCategory'.
I've tried the following but it returns a lexical error which seems like a json parsing issue:
fb <- fbad_get_search(q='Small business owners',type = 'adTargetingCategory',class='behaviors')
It returns this error:
Error: lexical error: invalid character inside string. mail (icloud, me, mac domains) ","audience_size":3796666,"re (right here) ------^
Is this possible currently within fbRads? I can see that it's possible when reviewing the Facebook Marketing API documentation, it's just not clear how that translates to the fbRads functions.
Thanks,
Curtis
The text was updated successfully, but these errors were encountered:
Update: It looks like there was hard return \n in some parts of the json file returned from the fbad_get_search query which was causing the fromJSON function to fail.
To correct it, I ran the fbad_request manually, removed the \n from the file and then called fromJSON. That seems to have corrected the issue. Is there are more native way to handle that type of issue from with fbRads?
Thanks for reporting this issue. IMO it's a Facebook API bug (returning invalid JSON), can you please open a report and follow-up on that at https://developers.facebook.com/bugs ?
Hopefully, it will be soon fixed by the FB developers and this ugly hack won't be needed in the fbRads package. Closing for now, but please reopen with an FB ticket number if it has to be fixed here.
Hello,
I'm trying to us the fbad_get_search function to get the id of certain behaviors within Facebook API. I can do this easily for type='adinterest', but I cannot figure out the appropriate syntax nor could I find any examples that illustrate how to use the fbad_get_search function when the type='adTargetingCategory'.
I've tried the following but it returns a lexical error which seems like a json parsing issue:
fb <- fbad_get_search(q='Small business owners',type = 'adTargetingCategory',class='behaviors')
It returns this error:
Error: lexical error: invalid character inside string. mail (icloud, me, mac domains) ","audience_size":3796666,"re (right here) ------^
Is this possible currently within fbRads? I can see that it's possible when reviewing the Facebook Marketing API documentation, it's just not clear how that translates to the fbRads functions.
Thanks,
Curtis
The text was updated successfully, but these errors were encountered: