Closed chicag0 closed 9 years ago
@chicag0,
which version of PHP are you running? The SDK runs 2 different encapsulations for curl 5.4 and 5.5+
https://github.com/facebook/facebook-php-ads-sdk/tree/master/src/FacebookAds/Http/Adapter/Curl
Are you using Implicit Fetching on cursors? https://github.com/facebook/facebook-php-ads-sdk#implicit-fetching
I'm using 5.6.7.
I've just tried with implicit fetching and the issue is still there. I must be doing something else wrong.
All I'm trying to do is get ad insights for a single ad set. Is there a way to do that without using cursors?
not really, but cursors are not the issue here. Can you tell whether this happens for the first request in the script or a succeeding one?
Here is a stack trace, if you see anything obvious?
I'll dig in a little deeper and see if I can tell where it is happening.
Actually, I went back and used setUseImplicitFetch(true) when fetching the adsets themselves, and my issue is gone! Thanks, I just need to make sure I am always including that. I Appreciate your help
When doing $adSet->getInsights() about 50% of the time I get an error:
curl_setopt_array(): supplied argument is not a valid cURL handle resource AbstractCurl.php on Line 109
If I keep refreshing the page, it will eventually return the data. I am able to grab data from the API many other places but seem to run into this issue often. Any idea what might be causing?