缺少Twitter身份验证配置(ParseTwitterUtils)

时间:2018-04-27 10:15:22

标签: android twitter parse-server

没有获得将Twitter身份验证与解析服务器集成的任何有效解决方案。我已经阅读了几乎github上的所有解决方案并应用它但没有运气。更多信息我使用过ParseUI项目。

https://github.com/parse-community/ParseUI-Android

我使用了parse'com.parse提供的这个库:parsetwitterutils-android:1.10.6'来验证用户。但没有运气。在通过互联网搜索后,我发现有些人告诉我们在index.js页面上添加以下代码。

oauth: {
  twitter: {
  consumer_key: "qweREbUdsfsdfsdfsdfsd4wIg9EX", // REQUIRED
  consumer_secret: "AZrUDjnEVUsdfsdfsdfsdfsdfsdfsdfxcpxBtM0X3" // REQUIRED
  },
  facebook: {
          appIds: "8489456465"
       }
  } 

之后我得到回应:

04-27 01:53:32.340 16920-17090/app.com.parse.example D/OkHttp: {"code":1,"error":"Twitter auth configuration missing"}
<-- END HTTP (55-byte body)
04-27 01:53:47.148 16920-17113/app.com.parse.example D/OkHttp: {"authData":{"twitter":{"consumer_key":"VdzzbGHfHgFhgFHGf4wIg9EX","auth_token":"157620898-qbODfHyHJKGHGJHGJHGJHGmF38LeJ2cd","screen_name":"blackjack","consumer_secret":"AZrUwerHJGJHGJHGJHGhgjhgZwJopxBtM0X3","id":"1554545698","auth_token_secret":"PK6IgEQMrszxcjhgjhgjhjhJHGrh1Ure8IGbuPX6H"}}}
--> END POST (319-byte body)
04-27 01:53:47.239 16920-17113/app.com.parse.example D/OkHttp: {"code":1,"error":"Twitter auth configuration missing"}
<-- END HTTP (55-byte body)
04-27 01:53:47.255 16920-16920/app.com.parse.example W/ParseLoginFragment: Twitter login failed, exception: com.parse.ParseRequest$ParseRequestException: Twitter auth configuration missing

也得到了:

04-27 16:31:33.705 4998-4998/com.parse.loginsample.basic     W/ParseLoginFragment: Twitter login failed, exception:     com.parse.ParseRequest$ParseRequestException: i/o failure

参考答案/讨论没有解决我的问题:

https://github.com/parse-community/parse-server/issues/973

Parse server twitter authentication: Twitter auth integrated but unable to create session to use on client side

Parse server open source Android Twitter Login is not working

1 个答案:

答案 0 :(得分:1)

oauth选项已弃用,将在以后的版本中删除,请改用auth选项。

  

http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication

请参阅更改日志:

  

https://github.com/parse-community/parse-server/blob/master/CHANGELOG.md#230

示例:

window = UIWindow(frame: UIScreen.main.bounds)
window?.makeKeyAndVisible()
window?.rootViewController =  CustomTabBarController()