【发布时间】:2012-08-29 11:39:23
【问题描述】:
我已经在我的 play 2 应用程序中成功安装了securesocial,并且它可以在 google 和 facebook 上运行。但我在推特上遇到了问题
我的 conf 文件有以下内容
#
# Twitter
#
securesocial.twitter.requestTokenURL=https://twitter.com/oauth/request_token
securesocial.twitter.accessTokenURL=https://twitter.com/oauth/access_token
securesocial.twitter.authorizationURL=https://twitter.com/oauth/authenticate
securesocial.twitter.consumerKey=mykey
securesocial.twitter.consumerSecret=mysecret
但我收到以下异常。
securesocial.provider.AuthenticationException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match.
我的密钥和秘密与我为此应用程序创建的 twitter API 帐户应用程序中的相同。我还包括了调用此请求的网站和 @anywhere 域。
有什么想法吗?
【问题讨论】:
-
Twitter 的@anywhere 功能可能存在问题。尝试使用 localhost 注册 Twitter 应用程序。
-
我在heroku上部署了应用程序,所以使用heroku url
-
没有线索 :( 也许可以尝试使用示例 (github.com/jaliss/securesocial/tree/master/samples) 看看它是否有效。
标签: heroku playframework playframework-2.0 securesocial