Jun-04-2018, 02:55 PM
Good morning. I am new in Python and in Facebook.
I need to build a python program to retrieve some information from facebook. Data I have is:
Business Manager ID
Account IDs for New Customers, Current Customers, Quarantine, Mobile, International.
And of course the token.
This is a command line that someone provided me:
curl -i -X POST \
-d "report_type=DPA_INSIGHT" \
-d "parameters={\"ad_account\":\"<adaccount_id>\", \"date_id\":\"2017-01-01\"}"
\
-d "access_token=<access_token>" \
"https://graph.facebook.com/v2.8/<business_id>/measurement_playground"
My question is what is the python code I should use in order to make this works ? I don't want to use the curl command line. Instead of this, I want to use python code directly.
Thanks a lot in advance.
Guillermo - Buenos Aires - Argentina
I need to build a python program to retrieve some information from facebook. Data I have is:
Business Manager ID
Account IDs for New Customers, Current Customers, Quarantine, Mobile, International.
And of course the token.
This is a command line that someone provided me:
curl -i -X POST \
-d "report_type=DPA_INSIGHT" \
-d "parameters={\"ad_account\":\"<adaccount_id>\", \"date_id\":\"2017-01-01\"}"
\
-d "access_token=<access_token>" \
"https://graph.facebook.com/v2.8/<business_id>/measurement_playground"
My question is what is the python code I should use in order to make this works ? I don't want to use the curl command line. Instead of this, I want to use python code directly.
Thanks a lot in advance.
Guillermo - Buenos Aires - Argentina