Skip to content
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

Upload Profile Picture Not Working #230

Closed
mycroftcanner opened this issue Dec 20, 2020 · 5 comments
Closed

Upload Profile Picture Not Working #230

mycroftcanner opened this issue Dec 20, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@mycroftcanner
Copy link
Contributor

mycroftcanner commented Dec 20, 2020

Uploading profile pictures doesn't seem to be working, I am passing a simple UIImage.

The error:

"https://i.instagram.com/api/v1/accounts/change_profile_picture/.\nInvalid response.\nProcessing handler returned nil.\n400"

Could this be related to the authentication causing problems as mentioned in other issues?

      self.upload(
        profilePicture: .init(
          image: image,
          caption: "A",
          size: .init(width: 320, height: 320)
        )
      ) { result in
        switch result {
        case .success:
          promise(.success(true))
        case let .failure(error):
          promise(.failure(error))
        }
      }
@sbertix
Copy link
Collaborator

sbertix commented Dec 22, 2020

Hey @mycroftcanner,

I haven't tested it and I seem to remember this wasn't one of the updated endpoints, so it might not be working, simply cause it's not supposed to...

But. Does the upload succeeds when not setting a caption? Does your image have an alpha layer? What's the aspect ratio? And the color space?
Cause those tend to be the issues most of the time.

@TheM4hd1 TheM4hd1 added the bug Something isn't working label Dec 23, 2020
@mycroftcanner
Copy link
Contributor Author

But. Does the upload succeeds when not setting a caption? Does your image have an alpha layer? What's the aspect ratio? And the color space?

Hey @sbertix !

Thanks for your reply, I tried all your suggestions, still no luck unfortunately :/

@TheM4hd1
Copy link
Owner

The endpoint needs to be updated, it doesn't work with old implementation.
I'll try to push a PR in near future.

@mycroftcanner
Copy link
Contributor Author

@TheM4hd1 did you get a chance to push a PR for this? Do you need any help?

@sbertix
Copy link
Collaborator

sbertix commented Mar 11, 2021

Hey @mycroftcanner,
please refer to #244 about the future of SwiftyInsta.

@sbertix sbertix closed this as completed Aug 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants