-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't figure out how to play song #36
Comments
This is exactly how the plugin is supposed to be used. Does the plugin return any specific error in the promise or do you instantly get an error thrown when calling the methods? Are you on Android or iOS? Could you post some console logs (either native, via Android / iOS Debugger, or from the web context via Chrome Debugger or Safari Debugger)? This would help identifying the issue. |
Since it ionic, it is both android and iOS but I am testing on iOS currently. Here is an output of the event emitter and the error I get. I am not sure why it thinks I am passing the wrong username/password as I am passing the actual auth token. I looked at #27 and their event emitter had all the possible events and other events but mine does not have any of that. Are these two related? |
No. Wrong username / password indicates the token you supplied is invalid. Are you sure you‘re passing in a valid one with the required scopes („streaming“ in this case)? |
The event emitter is not related to the login btw. You can login without getting an event emitter first. |
That fixed it! Thank you very much. I read in another issue about required scopes but it just clicked that that meant spotify requested scopes and not the scope of the app. |
Spotify does request OAuth scopes! (Remember, this is not your angular scopes, OAuth scopes represent the capabilities of the auth token). Our Spotify OAuth plugin is specifically designed to prevent invalid-token-errors by automatically refreshing the token whenever needed. See here: https://github.com/Festify/cordova-spotify-oauth. |
First off this plugin looks like it is exactly what I need, but I can't seem to truly figure out how it is used. It would be awesome if there was an example application that someone could look at and figure out how to use the plugin.
`
var events = spotifySession.getEventEmitter();
`
The app is an ionic app and at this point in the code I have already authenticated with OAuth. The event emitter that is printed is a promise but has no events emitted out of it and no sound plays. Any direction provided would be greatly appreciated.
The text was updated successfully, but these errors were encountered: