Submit Search
Upload
電子商務報告 Fb api使用與資料庫安全
•
Download as PPTX, PDF
•
1 like
•
1,804 views
U
um nop
Follow
FROM PCCU 第20組 電子商務報告 Fb api使用與資料庫安全 組員:施禹安、蘇敬仁、林郁翔
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 39
Download now
Recommended
Hp12享受吧,一勝九敗的網站企劃__網路公開版
Hp12享受吧,一勝九敗的網站企劃__網路公開版
Phoebe Lu
Github初上手教學
Github初上手教學
um nop
線上測驗平台之設計與實作以占卜及心理測驗為例 簡報檔
線上測驗平台之設計與實作以占卜及心理測驗為例 簡報檔
um nop
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Recommended
Hp12享受吧,一勝九敗的網站企劃__網路公開版
Hp12享受吧,一勝九敗的網站企劃__網路公開版
Phoebe Lu
Github初上手教學
Github初上手教學
um nop
線上測驗平台之設計與實作以占卜及心理測驗為例 簡報檔
線上測驗平台之設計與實作以占卜及心理測驗為例 簡報檔
um nop
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
More Related Content
Featured
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
Featured
(20)
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
電子商務報告 Fb api使用與資料庫安全
1.
電子商務報告之 簡易FB API使用與資料庫安全 第20組 組員:施禹安、蘇敬仁、林郁翔
2.
為什麼要介紹FB API? 因為各大網站幾乎都有一個第三方登入,在台灣最廣 泛的就是FB了。假如你做的是網站,那麼沒一個第 三方登入,就會覺得是不是上個世紀的東西,似乎已 經成為必然。
3.
成為一個FB開發者:
4.
開發者頁面,登入帳號
5.
進入後,點擊 Add a
New App
6.
這邊,介紹網站的申請,選擇www
7.
下面是你已經建立的App 右上角,選擇Skip and Create
APP ID 建立新的應用
8.
APP 名稱 APP 的命名空間(namespce)
9.
選幾隻老虎
10.
進入開發者DashBoard,可以開始進行設定
11.
打localhost (本機) 你的信箱(一定要) 新增一個網站的平台,也是用localhost
12.
Status& Review -
> 開啟此APP 點選YES
13.
目前的可以取得的權限如下:
14.
恭喜~ 目前開發者及開發者的好友都能夠使用這APP
15.
BTW …. 其他的70億的廣大群眾呢?
16.
事實是殘酷的.... 請把下面的表格填完 ◢▆▅▄▃-崩╰(〒皿〒)╯潰-▃▄▅▆◣
17.
進入正題,來使用FB 的 API
吧!
18.
選擇 Graph API
Explorer
19.
下好 Command 點選Submit
個資就出現了! 這是一個JSON格式,所以麻煩自己Google一下什麼 是JSON,不然request到了不能用XD
20.
我們可以選擇一堆的...? 但是......
21.
朕不給,你不能搶! (PS . 此階段FB會去審核你的App
才會給你權限)
22.
實作: 結合網頁做一個一登入就把你 姓名 、Email 、
ID 丟到網頁的程式 ??!
23.
24.
登入 -> 取得token
-> Ajax(非同步的JavaScript與 XML技術) -> 加入到資料庫 ->把所有登入資料拉出 來 理想中的流程:
25.
著手來寫HTML 與 Javascript
的Code 後面的所有程式碼放在 Github: https://github.com/unromanticman/FBLoginDemo
26.
FB相關程式碼可以到這裏找喔 https://developers.facebook.com/docs/facebook-login/web 填好appId
27.
FB相關程式可以到這裏找喔 https://developers.facebook.com/docs/facebook-login/web 要求取得的權限
28.
FB相關程式可以到這裏找喔 https://developers.facebook.com/docs/facebook-login/web 假如成功登入,會執行函式 testAPI();
29.
testAPI
30.
31.
快結束了…. 最後的SQL 比較安全的寫法
32.
請使用PDO 或 mysqli
別再用mysql 因為會被SQL Injection
33.
密碼請不要明碼儲存,加密的模組 好好利用
34.
記得使用Bindvalue的方式來下SQL 指令(PHP或ASP.NET都有相關的 教學)
35.
ㄏ 把資料寫入資料庫 INSERT
36.
ㄏ 使用PDO 做加入資料 使用BindValue的方式 然後加密儲存 (這邊加兩層) POST過來先檢查資料存在
37.
ㄏ 把資料讀取出來 SELECT
38.
使用PDO 做查詢資料 POST過來先檢查資料存在 這邊用意是當作Token使用 主要防止陌生人看到資料 解密並且輸出 (這邊解兩層)
39.
DEMO
Download now