500px-js-sdk
500px-js-sdk copied to clipboard
Requests using _method=post return 401 error
I'm having no problem when using _method=get to return a photo feed for an authenticated user, but using post to add a vote isn't working with the following code:
_500px.api('/photos/22168277/vote', 'post', { vote: '1' }, function (response) { });
Are there specific permissions that need to be requested during authentication?
My apologies, this can be closed.
Hi @madmanlear I am facing a similar issue. Could you please clarify how you sorted this out? A get request is being sent to the sever even when I set the method to post.
Sorry for the delay on this. I looked through the project I used 500px on and unfortunately my answer is I don't know how to solve this problem with the SDK, because I'm no longer using this SDK. In the app I was working on a user could log in to several social networks, so I switched everything to pure oauth and got rid of all the 3rd party SDKs I was using. I never solved the problem with this SDK.
I can tell you there is no need for specific permissions in order to post on the user's behalf. Sorry I couldn't be of more help!