-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getInsightsAsync fields parameter not working #157
Comments
Hi @michaeltricht, i was able to reproduce, will take a look into it. Thanks |
Summary: This task relates to issue 157 on the GitHub repo 'facebook/facebook-php-ads-sdk': #157 On async requests for Insights the fields work differently than when getting Insights directly: they should be passed on the params. Test Plan: - Change your test/config.php so 'no_async_jobs'=> false (so the tests for async run) - Run unit tests. Created test/FacebookAdsTest/Object/AsyncJobInsightsTest.php
Fixed on |
Please update composer version. 4 hours lost by a solve bug, solved in december and yet not in composer. Maybe there is more people with the same problem. Default composer version (your documentation) 2.5.* . Only works fine with aSync Insights dev-master |
I agree with @Jonatanmdez . @duliomatos : please update composer. |
Thx for the feedback, @michapixelfarm and @Jonatanmdez. We will have a minor release to include these changes this week. |
Workaround stopped working since 2.6.0 for those wondering... |
The fields (
$fields = []
) parameter of the methodgetInsightsAsync
does not work. It is not correctly passed to the API endpoint. See the following examples.cUrl (working)
Requesting an async report:
Once the async report is finished, it return the following as expected: (Example report ID 6034279794948)
PHP SDK (not working)
Requesting report:
Result:
Fields array is ignored. Result contains the following fields:
Expected
The fields given to the
$fields
array, the same as the cUrl example.Workaround
The workaround for now is adding fields to the
$params
array, like so:I have no proprosed fix. I already have spent too much time figuring things out that are badly documented.
The text was updated successfully, but these errors were encountered: