miałem zintegrował V2.2.5 Quickblox SDK w moim android aplikacji do pracy z Social Integration
Twitter ale wyrzuca błąd: „{ "błędy": [ "Bad danych uwierzytelniających"]}”Qucikblox Błąd: [dane] Bad uwierzytelniania na Twitterze logowania w Androidzie
tu jest mój następujący kod: -
// If in the below code I use static TOKEN & TOKEN-SECRET generated by my iOS app then it works well, whereas it is not working with Android generated TOKEN & its SECRET.
QBUsers.signInUsingSocialProvider(QBProvider.TWITTER,
preferences.getTwitterToken().trim(),
preferences.getTwitterTokenSecret().trim(),
new QBEntityCallbackImpl<QBUser>() {
@Override
public void onSuccess(QBUser user, Bundle args) {
Log.d("Login was successful", "user: " + user.toString());
}
@Override
public void onError(List<String> errors) {
Log.e("Twitter Login", "Error: " + errors);
}
});
i tutaj jest to pokazane w dzienniku: -
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: =========================================================
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: === REQUEST ==== 3d0e6877-35d5-44f6-8ed3-9e4f397635a5 ===
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: REQUEST
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: POST https://api.quickblox.com/login.json
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: HEADERS
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: QuickBlox-REST-API-Version=0.1.1
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: QB-SDK=Android 2.2.5
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: QB-Token=6dfb07e386b0ea3a1c9032ce797a766177ec57dd
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: PARAMETERS
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: provider=twitter
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: keys[token]=3147189640-RtvTcJ2rG2gNs3CqRUkFjyEnUQU0iKgvCCYiMYQ
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: keys[secret]=BLiq0J2IUT8oYXAne45wm3ULnD5T2Muea10VteIXeW2lW
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: INLINE
01-21 15:13:44.649 31938-31938/com.myapp D/QBASDK: POST https://api.quickblox.com/login.json?provider=twitter&keys[token]=3147189640-RtvTcJ2rG2gNs3CqRUkFjyEnUQU0iKgvCCYiMYQ&keys[secret]=BLiq0J2IUT8oYXAne45wm3ULnD5T2Muea10VteIXeW2lW
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: *********************************************************
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: *** RESPONSE *** 3d0e6877-35d5-44f6-8ed3-9e4f397635a5 ***
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: STATUS : 422
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: HEADERS
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Access-Control-Allow-Origin=*
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Cache-Control=no-cache
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Connection=keep-alive
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Content-Length=38
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Content-Type=application/json; charset=utf-8
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Date=Thu, 21 Jan 2016 09:43:47 GMT
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: QB-Token-ExpirationDate=2016-01-21 11:42:37 UTC
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: QuickBlox-REST-API-Version=0.1.1
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Server=nginx/1.8.0
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: Status=422 Unprocessable Entity
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: X-Rack-Cache=invalidate, pass
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: X-Request-Id=950c35c1ccb0d6d9d15b4de2ec11e781
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: X-Runtime=0.171756
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: X-UA-Compatible=IE=Edge,chrome=1
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: BODY
01-21 15:13:46.759 31938-31938/com.myapp D/QBASDK: '{"errors":["Bad Authentication data"]}'
01-21 15:13:46.779 31938-31938/com.myapp E/Twitter Login: Error: [Bad Authentication data]
Każda pomoc jest doceniana.
Dzięki!
[http://stackoverflow.com/questions/34824994/bad-authentication-data- quickblox-android] link może ci pomóc. Miałem ten sam problem podczas robienia facebookowego logowania w Androidzie. –
@AndroidDev, Mam tutaj prawidłowy token i token-secret, ponieważ te same poświadczenia są funkcjonalne w każdej innej aplikacji Twitter, dzięki której można publikować i pobierać źródła danych, ale nie działają w przypadku Quickblox. – Harpreet
Następnie może to być problem z zapleczem QuickBlox. –