500px-js-sdk icon indicating copy to clipboard operation
500px-js-sdk copied to clipboard

Requests using _method=post return 401 error

Open madmanlear opened this issue 12 years ago • 3 comments

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?

madmanlear avatar Jan 03 '13 15:01 madmanlear

My apologies, this can be closed.

madmanlear avatar Jan 03 '13 15:01 madmanlear

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.

panditgauresh avatar Mar 28 '14 23:03 panditgauresh

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!

madmanlear avatar Apr 15 '14 21:04 madmanlear