adamwynne/twitter-api

help with account-update-profile-image

Closed this issue · 1 comments

Hey, first of all, thank you so much for taking the time to write this code. It's saved me a lot of work.

I'm having some difficulty calling account-update-profile-image. I'm guessing I'm just doing something wrong, and I'd really appreciate some help.

My credentials do work for status updates, and all of the other calls I've tried so I'm assuming they're ok. Twitter says they have read, write and direct message permissions.

Going off the code I see in twitter/request.clj, and the test-image-upload function test/upload.clj, I think it should be something like:

(account-update-profile-image :oauth-creds *my-creds*
                              :body {:image (File. "profile.jpg")})

I've tried a number of different things with the :body parameter, but I typically get this response from twitter:

Exception Twitter responded to request with error 32: Could not authenticate you sun.reflect.GeneratedConstructorAccessor31.newInstance (:-1)

After I've tried this call, I can still use my-creds to update my status successfully, so I'm a bit confused.

Hi Jeff

I haven't used this function in quite a while and they might have changed the API - please let me know if you manage to resolve this issue (or just make a Pull Request).

Thanks
Adam