Blogs need a unique ID in addition to names

113 views
Skip to first unread message

Marco Arment

unread,
Jul 13, 2011, 12:08:54 PM7/13/11
to Tumblr API Discussion
Blogs currently return in /user/following, etc. as:

{
"name": "david",
"url": "http:\/\/www.davidslog.com",
"updated": 1308781073
}

One common use of a "following" API, and my intended use for
Instapaper, is a "Find my friends on Tumblr" feature. Ideally, when
someone connects their Tumblr account to their Instapaper account, I'd
like to store both their username (mostly for display purposes) and a
unique ID of some sort that never changes.

Then, when someone else does a "find people I follow on Tumblr"
request, I can fetch /user/following, get a list of unique IDs with
the usernames, and query my database for Instapaper users whose Tumblr
IDs match up to the IDs returned by /user/following.

I can do all of this now with just the usernames, but it's brittle,
since Tumblr users can change their usernames easily.

Facebook and Twitter both return permanent integer keys for users,
which prevents this problem. I'd love if Tumblr returned something
similar, either an integer or a string — doesn't matter. Just some
unique identifier for each blog that cannot be changed.

Thanks,
Marco Arment
m...@marco.org

@giromide

unread,
Jul 14, 2011, 3:11:21 PM7/14/11
to Tumblr API Discussion
I second such a change. The unchanging ID is essential to sanity.

Henry

unread,
Jul 14, 2011, 3:53:06 PM7/14/11
to Tumblr API Discussion
I agree, and would add that Users should have unique id's for similar
reasons that Marco mentioned. Right now User id's seem to just be the
users' initial blog subdomain.

[totally understand that this might be a difficult request.]

-Henry Sztul

ps love the new api, docs, and user group!

bbnnt

unread,
Jul 15, 2011, 7:28:40 AM7/15/11
to Tumblr API Discussion
As it is very easy on tumblr to change a blog name… this functionality
is almost mandatory.

Mahesh Asolkar

unread,
Jul 15, 2011, 2:33:10 PM7/15/11
to tumbl...@googlegroups.com
+1

Scott

unread,
Jul 22, 2011, 1:29:53 AM7/22/11
to Tumblr API Discussion
So, until unique IDs are implemented, here's my workaround for the
'brittleness' of {base-hostname}:

1. Call /info for each base-hostname, and get the total number of
posts for each blog,
2. Call /posts a couple times with random offsets (within the total
number of posts),
3. Store a list of the (unique!) post-IDs with the base-hostname.

It's not pretty, and it's not cheap - but as long as even one of the
posts I retrieve still exists, calling /posts with its ID will give me
the current url and base-hostname of the blog.

-STB

P.S. I will buy lunch for the Tumblr engineer who implements unique
IDs. Seriously. Ask Danielle.

On Jul 13, 12:08 pm, Marco Arment <m...@marco.org> wrote:
> Blogs currently return in /user/following, etc. as:
>
> {
>   "name": "david",
>   "url": "http:\/\/www.davidslog.com",
>   "updated": 1308781073
>
> }
>
> One common use of a "following" API, and my intended use for
> Instapaper, is a "Find my friends on Tumblr" feature. Ideally, when
> someone connects their Tumblr account to their Instapaper account, I'd
> like to store both their username (mostly for display purposes) and a
> unique ID of some sort that never changes.
>
> Then, when someone else does a "find people Ifollowon Tumblr"
Reply all
Reply to author
Forward
0 new messages