Loading...

網站植入Facebook登入FB.api請求修改

Temperature: 0 °C

ChungChung
author_tools

會特別紀錄下來的原因是因為FB.api請求又調整了~

function fblogin() {//開始
FB.login(function(response) {
if (response.authResponse) {
//同意授權並且登入執行這段
FB.api('/me', function (response) {

window.top.location = 'YOUR_URL';

});

}
else {
alert("須同意應用程式才能使用Facebook帳號進入此頁面");//不同意此應用程式
}
}, { scope:'email' });//要求存取Email
}

必須更改成
function fblogin() {//開始
FB.login(function(response) {
if (response.authResponse) {
//同意授權並且登入執行這段
FB.api('/me?fields=email,name,first_name,last_name,gender', function (response) {

window.top.location = 'YOUR_URL';

});

}
else {
alert("須同意應用程式才能使用Facebook帳號進入此頁面");//不同意此應用程式
}
}, { scope:'email' });//要求存取Email
}

在之前~若直接只輸入/me 就可以列出基本資料~

現在則要改成
/me?fields=email,name,gender

必須把想要請求的資訊直接列出~

以上紀錄。

 

台北市內湖區江南街71巷75弄 Go

https://innstory.com/story-網站植入Facebook登入FBapi請求修改-1274
寫程式筆記

Prev
 吃優格可以吃成這樣⊙⊙再多塗一點可以敷臉了

Next
ajax防止重複提交 

Nearby Attractions

台北市內湖區江南街71巷75弄-Nearby Attractions

  • 士林慈諴宮 Go
  • 原八芝蘭公學校講堂 Go
  • 臺灣總督府博物館 Go
  • 帝國生命保險株式會社臺北支店... Go
  • 國立臺灣大學日式宿舍─馬廷英... Go
  • 臺大法學院 Go

About the Author

Chung

我是chung
網路工作者
主業是網站系統開發建置
副業是做夢,寫故事
作品請參考/teme.biz
做夢請參考/innstory.com
聯絡/chung.teme@gmail.com

#有人用筆寫日記,有人用歲月寫日記,有人用照片寫日記,而我,用innstory寫日記。

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

Google map 功能導入

Google map 功能導...

blogmap 寫故事還是得有地圖才好厚! 前幾天,sam同我說有一個客戶有Google map的需...

Mysql 查詢時間區間是否包含特定日期

Mysql 查詢時間區間是否...

這其實只是一個簡單的問題,以前並不常用... 但這陣子寫的案子比較偏系統面,這樣的查詢問題變多了@@...

Android Studio 2.3 隨機改變背景顏色

Android Studio...

class55 開始學習APP 其實我照著工具書上的方式總是在宣告變數時會產生問題~ 例如工具書上寫...

Recommended reading

Other stories happened at this address

所以兒子,​​​​​​​你希望我待會喝鹹魚咖啡?

所以兒子,​​​​​​​你希...

s 歲個月,開始會跟我搶咖啡喝~ 我說U啊,等你學會怎麼開再來跟我搶吧( ̄∇ ̄) 然後,他開始拿著我...

jQuery resize取得瀏覽器目前視窗寬度

jQuery resize取...

pexelsphotokeyboard 在使用CSS調整RWD顯示時~ 也可以使用javascrip...

還是Chloe魅力無敵啊~

還是Chloe魅力無敵啊~

趁著兒子午睡,悄悄的把他懷中百味雜陳的Chloe送去洗澡~ 想說要過年了,也該清潔一下了。 怎知兒子...

櫻花樹下其實一點都不浪漫

櫻花樹下其實一點都不浪漫

a 以前,總覺得不管甚麼東西放在盛開的櫻花樹下,那種浪漫感覺是不可多得的時光。 自從車子停在浪漫的櫻...

過了三點一刻,但還是先來杯南洋咖啡吧~

過了三點一刻,但還是先來杯南...

過了三點一刻,但還是先來杯南洋咖啡吧~

5U的第1張生日卡片

5U的第1張生日卡片

s U的第張生日卡片,謝謝威廷跟瓊慧的用心。 U也謝謝威廷姊夫跟瓊慧姊姊\(^o^)/ 感覺這週是U...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format