Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Yu LI
Solutions Engineer
APAC
Facebook Marketing API
3
Marketing API
的 API會
5
https://developers.facebook.com/tools/explorer/
天
metadata=1
6
Build things ... to work less
change your life world
Case 1
9
會
1. Feed在
2. Facebook Business Manager
3. Feed在
4. Facebook 在
5.
6. 1
10
Facebook UI
11
•
• 24
•
•
• <24
•
12
https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/product-catalog
Facebook
API
feed_id = '<your product feed id>'
feed_upload = ProductFeedUpload(feed_id)
feed_upload.url = 'https;//www.apple2.com/mypr...
catalog_id = '<INSERT_YOUR_CATALOG_ID_HERE>'
catalog = ProductCatalog(catalog_id)
for item in items:
product_id, new_price...
這 



15
Mock UI
人會
16
Scan
Feed XML
Notification
Case 2
大
18
Yu's Personal Report
大
19
Yu's Ads Manager
1. Facebook Ads Manager
2. 要
3. Excel在
4. Excel在 到copy
5. Excel在
6.
7.
8.
20
1. Facebook Ads Manager 1-click 个
2.
3. Excel在
4. Excel在 到copy
5. Excel在 1-click 个 Excel
6.
7.
8. Robot
21
for my_ad_account_id in my_ad_account_ids:
ad_account = AdAccount(my_ad_account_id)
fields = [
'campaign_group_name', 'cam...
def writeAdInsight(ad_insight, con, report_date):
key_str = ""
value_str = ""
count = 0
for (key, value) in key_value.item...
DEMO
24
會
25
1. Facebook
2.
3. Excel
4.
5. Excel
6. Email
Case 3
是 會
27
會
28
會
一 會
會
29
到 一會
30
1-click 我
Data Mining
1-click
31
好
上 Marketing API
會
“ ROI < 3到 ”
“ CTR > 3%到 CPC < 1.5USD到 1000USD”
“ CTR < 2%到 CPC > 1 USD, ”
32
我
33
“ ROI < 3到...”“ ROI < 3到...”
“ ROI < 3到...”
Data Mining
34
人
“ 有 到 到 會”
“ 會”
“ 到 個 會”
會
Data Mining 個
35
一
1-click 我
Data
Mining
36
不
IT
Resources
37
▪ Official Developer Site
▪ https://developers.facebook.com/docs/marketing-api
▪ Official Facebook Group
▪ https://www.faceb...
https://developers.facebook.com/docs/marketing-api
Prochain SlideShare
Chargement dans…5
×

實戰Facebook Marketing API

1 383 vues

Publié le

Facebook行銷自動化應該怎樣開始?

(from Facebook網絡行銷研討會 2015-08 台灣)

Publié dans : Technologie
  • Want to preview some of our plans? You can get 50 Woodworking Plans and a 440-Page "The Art of Woodworking" Book... Absolutely FREE ★★★ http://tinyurl.com/y3hc8gpw
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

實戰Facebook Marketing API

  1. 1. Yu LI Solutions Engineer APAC Facebook Marketing API
  2. 2. 3
  3. 3. Marketing API
  4. 4. 的 API會 5 https://developers.facebook.com/tools/explorer/
  5. 5. 天 metadata=1 6
  6. 6. Build things ... to work less change your life world
  7. 7. Case 1
  8. 8. 9
  9. 9. 會 1. Feed在 2. Facebook Business Manager 3. Feed在 4. Facebook 在 5. 6. 1 10
  10. 10. Facebook UI 11 • • 24 • • • <24 •
  11. 11. 12 https://developers.facebook.com/docs/marketing-api/dynamic-product-ads/product-catalog Facebook API
  12. 12. feed_id = '<your product feed id>' feed_upload = ProductFeedUpload(feed_id) feed_upload.url = 'https;//www.apple2.com/myproducts.xml' r = feed_upload.remote_create() print('Upload started with id={}'.format(r.id)) Python sample code to upload feed
  13. 13. catalog_id = '<INSERT_YOUR_CATALOG_ID_HERE>' catalog = ProductCatalog(catalog_id) for item in items: product_id, new_price = item if new_price == '-': response = catalog.update_product( product_id, availability=Product.Availability.out_of_stock ) print('Product {} is now out of stock'.format(product_id)) else: # prices should be in cents and be an integer new_price_in_cents = int(float(new_price) * 100) response = catalog.update_product( product_id, price=new_price_in_cents, availability=Product.Availability.in_stock, ) print('Product {} is now costs R$ {}'.format(product_id, new_price)) Python sample code to update product
  14. 14. 這 
 
 15 Mock UI
  15. 15. 人會 16 Scan Feed XML Notification
  16. 16. Case 2
  17. 17. 大 18 Yu's Personal Report
  18. 18. 大 19 Yu's Ads Manager
  19. 19. 1. Facebook Ads Manager 2. 要 3. Excel在 4. Excel在 到copy 5. Excel在 6. 7. 8. 20
  20. 20. 1. Facebook Ads Manager 1-click 个 2. 3. Excel在 4. Excel在 到copy 5. Excel在 1-click 个 Excel 6. 7. 8. Robot 21
  21. 21. for my_ad_account_id in my_ad_account_ids: ad_account = AdAccount(my_ad_account_id) fields = [ 'campaign_group_name', 'campaign_name', 'campaign_id', 'impressions', 'clicks', 'spend', 'reach', 'actions', 'action_values' ] params = { 'time_range': { 'since': report_date, 'until': report_date }, 'action_attribution_windows': ['28d_click'], 'breakdowns': ['impression_device', 'placement'], 'level': 'campaign', 'limit': max_records } ad_insights = ad_account.get_insights(fields, params) count = 0 for idx in range(0,min(max_records,len(ad_insights))): ad_insight = ad_insights[idx] writeAdInsight(ad_insight, con, report_date) 22 Ad Insights
  22. 22. def writeAdInsight(ad_insight, con, report_date): key_str = "" value_str = "" count = 0 for (key, value) in key_value.items(): if count > 0: key_str += ", " value_str += ", " key_str += key value_str += """ + unicode(value) + """ count += 1 stat = "INSERT INTO ad_set_insight (" + key_str + ") VALUES (" + value_str + ")"; print stat cur = con.cursor() cur.execute(stat) 个
  23. 23. DEMO 24
  24. 24. 會 25 1. Facebook 2. 3. Excel 4. 5. Excel 6. Email
  25. 25. Case 3 是 會
  26. 26. 27
  27. 27. 會 28 會 一 會 會
  28. 28. 29 到 一會
  29. 29. 30 1-click 我 Data Mining
  30. 30. 1-click 31 好 上 Marketing API
  31. 31. 會 “ ROI < 3到 ” “ CTR > 3%到 CPC < 1.5USD到 1000USD” “ CTR < 2%到 CPC > 1 USD, ” 32
  32. 32. 我 33 “ ROI < 3到...”“ ROI < 3到...” “ ROI < 3到...”
  33. 33. Data Mining 34 人 “ 有 到 到 會” “ 會” “ 到 個 會” 會 Data Mining 個
  34. 34. 35 一 1-click 我 Data Mining
  35. 35. 36 不 IT
  36. 36. Resources 37
  37. 37. ▪ Official Developer Site ▪ https://developers.facebook.com/docs/marketing-api ▪ Official Facebook Group ▪ https://www.facebook.com/marketingdevelopers ▪ Samples, Play and Discover ▪ https://www.facebookmarketingdevelopers.com 38
  38. 38. https://developers.facebook.com/docs/marketing-api

×