forked from arp19690/Facebook-Auto-Post
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AmazonAffiliateFunctions.py
40 lines (32 loc) · 1.66 KB
/
AmazonAffiliateFunctions.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
from config import AMAZON_AFFILIATE_DEALS_ACCESS_TOKENS_LIST
from config import AMAZON_AFFILIATE_URL
from helpers import mac_notify
from amazon_offers import helpers as AMZ_helpers
from amazon_offers import general_links as GL
from amazon_offers import victoria_secret_cosmetics as VCS
from amazon_offers.threadaffiliates import functions as TAFunctions
import TwitterFunctions
# Posting Amazon Affiliate links - ThreadAffiliate Website Links
AffiliateProducts = TAFunctions.fetch_products()
print("Current Task: Posting ThreadAffiliate Website Links on Facebook")
AMZ_helpers.post_on_fb(AMAZON_AFFILIATE_DEALS_ACCESS_TOKENS_LIST,
AffiliateProducts,
TAFunctions.get_post_message_list(),
TAFunctions.WEBSITE_BASE_URL)
print("Current Task: Posting ThreadAffiliate Website Links on Twitter")
TwitterFunctions.post_multiple_tweets(AffiliateProducts)
# Posting Amazon Affiliate links - General Categories
print("Current Task: Posting General Amazon Links")
AMZ_helpers.post_on_fb(AMAZON_AFFILIATE_DEALS_ACCESS_TOKENS_LIST,
GL.CHILD_ATTACHMENT_LIST,
GL.MESSAGE_TEXT_LIST,
AMAZON_AFFILIATE_URL)
# Posting Amazon Affiliate links - Victoria Secret Cosmetics
print("\nCurrent Task: Victoria Secret Cosmetics Links")
AMZ_helpers.post_on_fb(AMAZON_AFFILIATE_DEALS_ACCESS_TOKENS_LIST,
VCS.CHILD_ATTACHMENT_LIST,
VCS.MESSAGE_TEXT_LIST,
AMAZON_AFFILIATE_URL,
VCS.EXCLUDE_PROFILE_IDS)
mac_notify("Affiliate links",
"All promotional links have been posted successfully")