Closed kataku closed 5 months ago
Additional note: if you don't ask for the breakdown the result parses fine but i need to link_url_asset
okay so the reason the SDK falls over on this is a change in the API structure on link_url_asset from String to an Object containing website_url and id. The SDK needs to be updated to handle this change. Please, for the next version fix this
thanks for reporting this. the breakdown link_url_asset
was introduced and by default all the breakdowns were set to String type. it's a gap to fix all the non-string type breakdowns. we'll introduce the new type AdAssetLinkURL
and map this breakdown's output to this type.
415bc0c17921af4b37b0f0a7c3d2825a9da77fc5 addresses this issue
Which SDK version are you using?
18.0.2
What's the issue?
The SDK throws an error trying to parse the API response.
Steps/Sample code to reproduce the issue
Observed Results:
So the error happens parsing the json that comes back: Expected a string but was BEGIN_OBJECT at line 1 column 280 path $.link_url_asset
Full log: Invalid response string: {"data":[{"ad_id":"23853349276130531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276140531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276150531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276170531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294110531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294130531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294150531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294160531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297930531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297950531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297960531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297970531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060040531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060050531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060100531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060110531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586600531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586610531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586630531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586640531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740720531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740730531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740740531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740760531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853630597530531","adset_id":"23853630597540531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|FR|fr|BioNeMo-Webinar-OnDemand|IND|OnDemand|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}}],"paging":{"cursors":{"before":"MAZDZD","after":"MjQZD"},"next":"https:\/\/graph.facebook.com\/v18.0\/act_249654877010472\/insights?access_token=<>&fields=ad_id\u00252Cadset_id\u00252Cadset_name\u00252Ccampaign_name&level=ad&time_range=\u00257B\u002522since\u002522\u00253A\u0025222020-10-04\u002522\u00252C\u002522until\u002522\u00253A\u0025222023-11-03\u002522\u00257D&breakdowns=\u00255B\u002522link_url_asset\u002522\u00255D&limit=25&after=MjQZD"}}com.facebook.ads.sdk.APIException$MalformedResponseException: Invalid response string: {"data":[{"ad_id":"23853349276130531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276140531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276150531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349276170531","adset_id":"23853349276120531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294110531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294130531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294150531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349294160531","adset_id":"23853349294140531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297930531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297950531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297960531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853349297970531","adset_id":"23853349297920531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060040531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060050531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060100531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443060110531","adset_id":"23853443059870531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|RET","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586600531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586610531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586630531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853443586640531","adset_id":"23853443586590531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740720531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740730531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740740531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853454740760531","adset_id":"23853454740770531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|EMEA|en|BioNeMo-Webinar-OnDemand|IND|PRSP","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}},{"ad_id":"23853630597530531","adset_id":"23853630597540531","adset_name":"IX10|Q1FY24|PSOC|FCBK|IMG|FR|fr|BioNeMo-Webinar-OnDemand|IND|OnDemand|CLOL","campaign_name":"IX10|Q1FY24|56288488|PSOC|FCBK|EMEA|EN|IND|BioNeMo-Webinar-OnDemand","date_start":"2020-10-04","date_stop":"2023-11-03","link_url_asset":{"website_url":"http:\/\/fb.me\/","id":"23853246686160531"}}],"paging":{"cursors":{"before":"MAZDZD","after":"MjQZD"},"next":"https:\/\/graph.facebook.com\/v18.0\/act_249654877010472\/insights?access_token=<>&fields=ad_id\u00252Cadset_id\u00252Cadset_name\u00252Ccampaign_name&level=ad&time_range=\u00257B\u002522since\u002522\u00253A\u0025222020-10-04\u002522\u00252C\u002522until\u002522\u00253A\u0025222023-11-03\u002522\u00257D&breakdowns=\u00255B\u002522link_url_asset\u002522\u00255D&limit=25&after=MjQZD"}}
at com.facebook.ads.sdk.AdsInsights.parseResponse(AdsInsights.java:521)
at com.facebook.ads.sdk.AdAccount$APIRequestGetInsights.parseResponse(AdAccount.java:19847)
at com.facebook.ads.sdk.AdAccount$APIRequestGetInsights.execute(AdAccount.java:19858)
at com.facebook.ads.sdk.AdAccount$APIRequestGetInsights.execute(AdAccount.java:19852)
at metaConnector.getCampaigns.getAds(getCampaigns.java:281)
at metaConnector.main.getAdsWithRetries(main.java:57)
at metaConnector.main.main(main.java:507)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 280 path $.link_url_asset
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:226)
at com.google.gson.Gson.fromJson(Gson.java:963)
at com.google.gson.Gson.fromJson(Gson.java:928)
at com.google.gson.Gson.fromJson(Gson.java:877)
at com.google.gson.Gson.fromJson(Gson.java:848)
at com.facebook.ads.sdk.AdsInsights.loadJSON(AdsInsights.java:401)
at com.facebook.ads.sdk.AdsInsights.parseResponse(AdsInsights.java:458)
... 6 more
Caused by: java.lang.IllegalStateException: Expected a string but was BEGIN_OBJECT at line 1 column 280 path $.link_url_asset
at com.google.gson.stream.JsonReader.nextString(JsonReader.java:824)
at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:380)
at com.google.gson.internal.bind.TypeAdapters$15.read(TypeAdapters.java:368)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
Expected Results:
To get ad data and the link_url_asset info.