Giter Site home page Giter Site logo

Comments (6)

seejohnrun avatar seejohnrun commented on August 17, 2024

Heya - if you're trying to link to the original content you may want to check out the "link" type (if I understand the question properly). Take a look at http://www.tumblr.com/docs/en/api/v2#posting - thanks!

from pytumblr.

jeffThompson avatar jeffThompson commented on August 17, 2024

Actually, I'm trying to get the link to the Tumblr post itself (to include in the Tweet similar to how the default Tweet works).

Would it involve reading the response back from the Tumblr client? It looks like the URL for a post is something like {base url}.tumblr.com/{random number}/{custom slug, if used}

Am I on the right track?

from pytumblr.

jeffThompson avatar jeffThompson commented on August 17, 2024

A quick test and I see I can get what I think is the post ID from the client response, but that happens after I post with the custom Tweet, for example:

>> response = client.create_photo(blog_address, data=image_path, tags=tags, slug=slug, tweet=tweet)  
>> print response
{u'id': 74493097090}

(where tweet is a string built earlier and formatted for Twitter)

from pytumblr.

seejohnrun avatar seejohnrun commented on August 17, 2024

Yes - that's how you would get the link - there should be a url property if I remember correctly in the response

from pytumblr.

jeffThompson avatar jeffThompson commented on August 17, 2024

Thanks - looking a little more at the Tumblr docs, it appears that the Tweet parameter "manages the autotweet (if enabled) for this post: set to off for no tweet, or enter text to override the default tweet".

I think this means that one would need to use the Twitter API to separately post with the response URL, which is totally fine, just an extra step!

FWIW, I'm using PyTumblr for this project to post roughly 2500 screenshots of computers on Law & Order over the next year-and-a-half.

from pytumblr.

seejohnrun avatar seejohnrun commented on August 17, 2024

Ah I see what you mean now :)
yep - that sounds right to me

Good luck on your project - I think we had connected at some point earlier (I remember the concept) and I'm excited to see more. Will follow along!

from pytumblr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.