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

publish: support POSSE like to Instagram #326

Closed
tantek opened this issue Dec 24, 2014 · 9 comments
Closed

publish: support POSSE like to Instagram #326

tantek opened this issue Dec 24, 2014 · 9 comments
Assignees
Labels

Comments

@tantek
Copy link
Contributor

tantek commented Dec 24, 2014

if I post a "like" of an Instagram photo (with a u-like-of link to an Instagram photo permalink), it would be great if I could call Bridgy Publish to POSSE that like to my account on Instagram.

@tantek
Copy link
Contributor Author

tantek commented Dec 24, 2014

Please also document support for this feature on https://www.brid.gy/about#like :)

@snarfed
Copy link
Owner

snarfed commented Jan 3, 2015

tentatively bumping to now. i don't plan to jump on it myself in the near future, but theoretically we should only need to implement the instagram API part, and flip a handful of switches elsewhere, and the rest should Just Work.

@snarfed snarfed added the now label Jan 3, 2015
@tantek tantek changed the title Bridgy Publish support POSSE like to Instagram Jan 4, 2015
@kylewm kylewm self-assigned this Jan 4, 2015
@kylewm
Copy link
Contributor

kylewm commented Jan 4, 2015

can you fill me in on the background here --

https://github.com/snarfed/python-instagram is a fork of
https://github.com/mgunneras/python-instagram which is a fork of
https://github.com/Instagram/python-instagram

but it seems the latter two have diverged non-trivially. If I want a change from the Instagram/python-instagram fork, should I just export it as a diff and apply it manually?

I could also merge in the upstream (Instagram/python-instagram) fork.

@snarfed
Copy link
Owner

snarfed commented Jan 4, 2015

thanks again for tackling this! ugh, yeah, the libs. you're right, nontrivial skew btw all three. manual patch is probably the best route...but honestly i'd love to drop the lib and just use the REST API directly. that's obviously scope creep for this, but i'm totally open to it! either one sgtm.

@kylewm
Copy link
Contributor

kylewm commented Jan 4, 2015

cool, I agree it would be nice to pull out the lib and I'm happy to tackle that.

@kylewm
Copy link
Contributor

kylewm commented Jan 6, 2015

Question: When a token is revoked, Instagram replies with status code 400 and error_type=OAuthAccessTokenException. interpret_http_exception catches this particular case and changes the code to 401

This is important because later on Bridgy gets the 401 and disables the source.

Should I do basically the same thing in interpret_http_exception now that it's a regular urllib2.HTTPError instead of the special InstagramAPIError? i.e. check for 'OAuthAccessTokenException' and 'APIRequiresAuthenticationError' in the body of the error message and give 401 as the error code?

Thanks!

@snarfed
Copy link
Owner

snarfed commented Jan 6, 2015

yup, good call, that's exactly what we'd want to do. thanks!

@snarfed
Copy link
Owner

snarfed commented Jan 8, 2015

yay, launched! example: https://snarfed.org/2015-01-08_photo-by-thejohnnysmith-2

@kylewm, i'll let you do the honor of closing this. :P

@kylewm kylewm closed this as completed Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants