Skip to content

Commit 0f9957c

Browse files
author
Evan Chen
committed
Bug fixes and bump version
Summary: Fixes a bug with bootstrap that removed the ability to test with dev version Fixes a bug where url_override is missing for api call Video Upload example uses config file Test Plan: Run python examples/upload_video.py (Note this can take up to 5 minutes to run without any output, because of video processing time)
1 parent 8daaf75 commit 0f9957c

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

examples/upload_video.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
from facebookads import FacebookAdsApi
66
from facebookads.objects import AdAccount, AdVideo
77

8-
import configparser
98
import os
10-
9+
import configparser
1110
config = configparser.RawConfigParser()
1211
this_dir = os.path.dirname(__file__)
1312
config_filename = os.path.join(this_dir, 'my_app_session.cfg')
@@ -22,7 +21,7 @@
2221
)
2322

2423
if __name__ == '__main__':
25-
my_account = AdAccount('act_<AD_ACCOUNT_ID>')
24+
my_account = AdAccount(config.get('Defaults', 'ad_account'))
2625

2726
# create video object
2827
video = AdVideo(parent_id=my_account.get_id_assured())

facebookads/api.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ class FacebookAdsApi(object):
133133
this sdk.
134134
"""
135135

136-
SDK_VERSION = '2.3.1'
136+
SDK_VERSION = '2.3.2'
137137

138138
API_VERSION = 'v2.3'
139139

@@ -216,6 +216,7 @@ def call(
216216
params=None,
217217
headers=None,
218218
files=None,
219+
url_override=None,
219220
api_version=None,
220221
):
221222
"""Makes an API call.
@@ -260,7 +261,7 @@ def call(
260261
if not isinstance(path, six.string_types):
261262
# Path is not a full path
262263
path = "/".join((
263-
self._session.GRAPH,
264+
self._session.GRAPH or url_override,
264265
api_version or self.API_VERSION,
265266
'/'.join(map(str, path)),
266267
))

facebookads/bootstrap.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
this_dir = os.path.dirname(__file__)
2525
repo_dir = os.path.join(this_dir, os.pardir)
26+
sys.path.insert(1, repo_dir)
2627

2728
import __main__ as main
2829
import json

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
requirements_filename = os.path.join(this_dir, 'requirements.txt')
3030

3131
PACKAGE_NAME = 'facebookads'
32-
PACKAGE_VERSION = '2.3.1'
32+
PACKAGE_VERSION = '2.3.2'
3333
PACKAGE_AUTHOR = 'Facebook'
3434
PACKAGE_AUTHOR_EMAIL = ''
3535
PACKAGE_URL = 'https://github.com/facebook/facebook-python-ads-sdk'

0 commit comments

Comments
 (0)