Search code examples
androidtwitterparse-server

Twitter auth configuration missing (ParseTwitterUtils)


Did not get any working solution for integrating Twitter authentication with parse server. I have read almost all the solutions over github and applied it but no luck.More information I have used ParseUI project.

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

I have used this library provided by parse'com.parse:parsetwitterutils-android:1.10.6' to authenticate user. But no luck. After searching over internet I found some are telling to add following code on index.js page.

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

After then I am Getting response:

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

Also got:

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

Reference answer/discussion didn't solve my problem:

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


Solution

  • oauth option is deprecated and will be removed in a future release, please use auth option instead.

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

    See change log:

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

    Example:

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