facebook-python-business-sdk icon indicating copy to clipboard operation
facebook-python-business-sdk copied to clipboard

ReportStats Asynchronous Query

Open tpaskhalis opened this issue 12 years ago • 3 comments

There is currently no straightforward way to fetch Ad Report Stats through asynchronous queries. get_report_stats in AdAccount only allows direct GET requests. And most historical data is not accessible through it, returning error 1487535. Will this be implemented in the future?

tpaskhalis avatar Nov 20 '14 17:11 tpaskhalis

This issue still remains unresolved. Does anyone know a workaround for this that doesn't involve cURL?

cscanlin avatar Jan 27 '15 00:01 cscanlin

Hey guys, we're working on building this out. Sorry for the delay.

A workaround would be to use the FacebookAdsApi::call method and parse the response yourself.

Here's a sample of how to make a call using that method.

# Instantiate an API object. You likely already have one so you
# can use FacebookAdsApi.get_default_api()

api = FacebookAdsApi.get_default_api()
response = api.call('GET', 'https://graph.facebook.com/me')
print response.json()

# Output
# {u'first_name': u'Evan', u'last_name': u'Chen', u'verified': True, u'name': u'Evan C...}

ebzlo avatar Jan 27 '15 01:01 ebzlo

Hi, do you know when a solution will be ready in the sdk ?

maimonoded avatar May 21 '15 11:05 maimonoded