For example, citric acid has three acidic protons, all of which are carboxylic acids. Despite being part of the same functional groups, they all have very different pKas. Why (and how?) is this?


Question: Can you demonstrate in Python how to post an ad to Facebook's ads API?
Answer: This is a year too late, but maybe it'll help someone who comes in through Google or something. :P

Try the Facebook Python Ads API SDK (which wasn't previously available):
https://github.com/facebook/facebook-python-ads-sdk

There are some examples there on how to bootstrap your session and create objects, but here's a quick snippet:

from facebookads.session import FacebookSession
from facebookads.api import FacebookAdsApi
from facebookads.objects import AdGroup


my_app_id = '&lt;APP_ID&gt;'
my_app_secret = '&lt;APP_SECRET&gt;'
my_access_token = '&lt;ACCESS_TOKEN&gt;'
my_session = FacebookSession(my_app_id, my_app_secret, my_access_token)
my_api = FacebookAdsApi(my_session)
FacebookAdsApi.set_default_api(my_api)

new_adgroup = AdGroup(parent_id='act_&lt;AD_ACCOUNT_ID&gt;')
new_adgroup[AdGroup.Field.name] = 'My Adgroup'
new_adgroup[AdGroup.Field.campaign_id] = &lt;AD_SET_ID&gt;
new_adgroup[AdGroup.Field.creative] = {
    'creative_id': &lt;CREATIVE_ID&gt;
}
new_adgroup.remote_create()