2016-07-07 97 views
0

我正在開發與離子和Backand的應用程序,並且我正在使用與Backand服務的社交帳戶登錄。 社交登錄過程沒問題,但我想從Facebook和Google Plus獲取ID以獲取個人資料圖片。 我的支持Backand的聊天,我知道,在安全性和驗證有一個動作「beforesocialSignUp」我還沒有發表意見的線來獲取數據:離子與Backand社交登錄:個人資料圖片

'use strict'; 
function backandCallback(userInput, dbRow, parameters, userProfile) { 
    // get facebook id and put in fuid field that you need to add to your user object 
    userInput.fuid = parameters.socialProfile.additionalValues.id; 
    // get gender from facebook and put in gender field that you need to add to your user object 
    // userInput.gender = parameters.socialProfile.additionalValues.gender; 
} 

而且我已經創建了FUID場在我的用戶對象中,但是,當我使用Facebook或Google+進行登錄時,它不會保存任何內容。登錄是好的,但我無法獲得ID數據。

有什麼想法?

回答

1

我有完全相同的問題。

解決的辦法是將BeforeSocialSignUp函數的where條件從false設置爲true。

這在解釋的文檔中是不存在的。

我花了3天RO算出這個:-(

現在登錄預期和FUID場被分配工作。

我的下一步是讓從FB賬戶資料圖片,但因此我必須向用戶訪問令牌發出API請求,我不知道如何從後端獲取令牌。

相關問題