facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
818 stars 514 forks source link

No examples in the documentation for more complex request builds #476

Closed webbby closed 5 years ago

webbby commented 5 years ago

The documentation just scratches the surface of almost trivial requests using the api. Please give an example of how to build the following request:

me/adaccounts?fields=
  campaigns.filtering([
    {'field':'campaign.updated_time', 'operator':'GREATER_THAN',  'value': 1526256000}
  ]) {name, updated_time},
  adsets.filtering([
    {'field':'adset.updated_time', 'operator':'GREATER_THAN',  'value': 1526256000}
  ]) {name, updated_time}

What if one wants to go nested 3 levels campaigns -> adsets -> ads ?

me/adaccounts?fields=
  campaigns.filtering([
    {'field':'campaign.updated_time', 'operator':'GREATER_THAN',  'value': 1526256000}
  ]) {
    name, 
    updated_time, 
    adsets.filtering([
      {'field':'adset.updated_time', 'operator':'GREATER_THAN',  'value': 1526256000}
    ]){
      name, 
      updated_time,
      ads.filtering([
        {'field':'ad.updated_time', 'operator':'GREATER_THAN',  'value': 1526256000}
      ]){name, updated_time}
    }
  }

Can such requests be achieved with the Business SDK? If so how?

jingping2015 commented 5 years ago

We're a small team, and it doesn't look as though anyone in the community is actively working on this issue, so we've decided to close it. If you plan to send us a pull request resolving the issue let us know in the comments and we will re-open it and assign it to you. If you feel this issue deserves more attention, please comment here with your use-case and we will try to prioritize as appropriate.