SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
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/myproducts.xml'
r = feed_upload.remote_create()
print('Upload started with id={}'.format(r.id))
Python sample code to
upload feed
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
這 



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', '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
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)
个
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.facebook.com/marketingdevelopers
▪ Samples, Play and Discover
▪ https://www.facebookmarketingdevelopers.com
38
https://developers.facebook.com/docs/marketing-api

Weitere ähnliche Inhalte

Ähnlich wie 實戰Facebook Marketing API

ARabia hossain project report.pdf
ARabia hossain project report.pdfARabia hossain project report.pdf
ARabia hossain project report.pdf
ArabiaHossain
 
Final Presentation V1.8
Final Presentation V1.8Final Presentation V1.8
Final Presentation V1.8
Chad Koziel
 

Ähnlich wie 實戰Facebook Marketing API (20)

Optimization in django orm
Optimization in django ormOptimization in django orm
Optimization in django orm
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
 
Form demoinplaywithmysql
Form demoinplaywithmysqlForm demoinplaywithmysql
Form demoinplaywithmysql
 
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on AndroidMobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
Mobile 2.0 Open Ideas WorkShop: Building Social Media Enabled Apps on Android
 
Pruebas unitarias con django
Pruebas unitarias con djangoPruebas unitarias con django
Pruebas unitarias con django
 
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
Alon Fliess: APM – What Is It, and Why Do I Need It? - Architecture Next 20
 
Observability and more architecture next 2020
Observability and more   architecture next 2020Observability and more   architecture next 2020
Observability and more architecture next 2020
 
ARabia hossain project report.pdf
ARabia hossain project report.pdfARabia hossain project report.pdf
ARabia hossain project report.pdf
 
Final Presentation V1.8
Final Presentation V1.8Final Presentation V1.8
Final Presentation V1.8
 
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
Educate 2017: Customizing Assessments: Why extending the APIs is easier than ...
 
Opticon 2015 - Getting Started with the Optimizely Developer Platform
Opticon 2015 - Getting Started with the Optimizely Developer PlatformOpticon 2015 - Getting Started with the Optimizely Developer Platform
Opticon 2015 - Getting Started with the Optimizely Developer Platform
 
How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019How to Leverage APIs for SEO #TTTLive2019
How to Leverage APIs for SEO #TTTLive2019
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
 
IndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web AppsIndexedDB and Push Notifications in Progressive Web Apps
IndexedDB and Push Notifications in Progressive Web Apps
 
Yufeng Guo | Coding the 7 steps of machine learning | Codemotion Madrid 2018
Yufeng Guo |  Coding the 7 steps of machine learning | Codemotion Madrid 2018 Yufeng Guo |  Coding the 7 steps of machine learning | Codemotion Madrid 2018
Yufeng Guo | Coding the 7 steps of machine learning | Codemotion Madrid 2018
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Building Intelligent Apps with MongoDB and Google Cloud - Jane Fine
Building Intelligent Apps with MongoDB and Google Cloud - Jane FineBuilding Intelligent Apps with MongoDB and Google Cloud - Jane Fine
Building Intelligent Apps with MongoDB and Google Cloud - Jane Fine
 
How AdWords UI maps into adwords api
How AdWords UI maps into adwords apiHow AdWords UI maps into adwords api
How AdWords UI maps into adwords api
 
Solid angular
Solid angularSolid angular
Solid angular
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

實戰Facebook Marketing API