URL shortening parameter is not used in api.py, therefore service is not available
See original GitHub issueHi bear,
You’ve did a nice job on this repo! 😃
Please correct me if I’m wrong but I can’t use the custom URL shortening service as-is because there is no reference of it in your api.py
apart from a parameter and a documentation comment:
https://github.com/bear/python-twitter/blob/master/twitter/api.py#L140
https://github.com/bear/python-twitter/blob/master/twitter/api.py#L169
I have implemented after some work a bitly oauth client which can shorten urls, then created a url shortener class according to your shorten_url.py
but when I tried to use it, there was no effect of it. When I examined the api.py
, I’ve recognized the shortner
variable is not used, which is a really great downside of the whole project.
Can you or somebody else please provide a fix for this issue? 😃
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (1 by maintainers)
Top GitHub Comments
If you have a working implementation of a shortener service, you can create a shortener instance, pass the URL to that, and replace the long URL with the short URL in the status string, and then post the modified string to Api.PostUpdate():
Just created a PR for the documentation and examples, so I think the issue can be closed. Code from above is now in the
shorten_url.py
example and has inline comments so folks can see how it works a little easier.