【发布时间】:2016-04-28 05:02:55
【问题描述】:
我一直在查看 https://github.com/rfdickerson/watson-translation-demo,它试图展示如何在 iOS 上使用 Facebook OAuth 和 NodeJS 后端进行身份验证。
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)
问题是server/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-authentication 服务。
【问题讨论】:
-
我给repo的作者发了消息,请他回复。
标签: ios facebook oauth-2.0 ibm-cloud ibm-watson