Spaces:
Paused
Paused
Update func_facebook.py
Browse files- func_facebook.py +4 -1
func_facebook.py
CHANGED
@@ -11,6 +11,9 @@ def hide_negative_comments(token):
|
|
11 |
return facebook.GraphAPI(access_token=token)
|
12 |
|
13 |
def get_facebook_posts():
|
|
|
|
|
|
|
14 |
graph = init_facebook_client(token)
|
15 |
|
16 |
# Fetching user posts
|
@@ -18,7 +21,7 @@ def hide_negative_comments(token):
|
|
18 |
user_posts = user_posts_data.get('data', [])
|
19 |
|
20 |
# Fetching ads posts
|
21 |
-
ads_posts_data = graph.get_object(
|
22 |
ads_posts = ads_posts_data.get('data', [])
|
23 |
|
24 |
# Combine the posts from both sources
|
|
|
11 |
return facebook.GraphAPI(access_token=token)
|
12 |
|
13 |
def get_facebook_posts():
|
14 |
+
params = {
|
15 |
+
'include_inline_create': 'true' # Параметры запроса
|
16 |
+
}
|
17 |
graph = init_facebook_client(token)
|
18 |
|
19 |
# Fetching user posts
|
|
|
21 |
user_posts = user_posts_data.get('data', [])
|
22 |
|
23 |
# Fetching ads posts
|
24 |
+
ads_posts_data = graph.get_object('me/ads_posts', **params)
|
25 |
ads_posts = ads_posts_data.get('data', [])
|
26 |
|
27 |
# Combine the posts from both sources
|