我一直在尋找https://github.com/rfdickerson/watson-translation-demo,它試圖展示如何使用iOS上的Facebook OAuth和NodeJS後端進行身份驗證。Watson iOS SDK身份驗證
iOS的代碼很簡單:
let token: String = FBSDKAccessToken.currentAccessToken().tokenString
let fbAccess = FacebookAuthenticationStrategy(
tokenURL: "https://watsonsdkdemo.mybluemix.net/language-translation-service/api/v1/token",
fbToken: token)
translateService = LanguageTranslation(authStrategy: fbAccess)
的問題是,服務器/ app.js有
var creds = appEnv.getServiceCreds(/facebook-authentication/) || {}
和manifest.yml具有
- services:
- facebook-authentication
但是,當您將cf push
腳本轉換爲您獲得的Bluemix帳戶:
FAILED
Could not find service facebook-authentication to bind to xxxxxxx
問題是作者描述'facebook-authentication'服務是什麼地方。
在服務器部署說明他們有
$ cf login
$ cf create-service speech_to_text standard speech-to-text-service
$ cf create-service text_to_speech standard text-to-speech-service
$ cf create-service language_translation standard language-translation-service
$ cf env
$ cd server
$ cf push
沒有說明Facebook的身份驗證服務是什麼。
我給回覆的作者留言並要求他回覆。 –