API call to test if a user is currently blocked

0 views
Skip to first unread message

dougw

unread,
Dec 19, 2008, 11:07:51 PM12/19/08
to Twitter Development Talk
The current API doc specifies restful CREATE and DESTROY methods for
BLOCK. It would be helpful to have an EXISTS method to test if a user
is BLOCKed similar to the friendship exists method:
http://apiwiki.twitter.com/REST+API+Documentation#exists. The
application I'm writing would benefit from such a method method.

Thoughts?

Doug

(hope caps don't offend, just trying to make it easier to read).

Cameron Kaiser

unread,
Dec 20, 2008, 12:58:03 AM12/20/08
to twitter-deve...@googlegroups.com
> The current API doc specifies restful CREATE and DESTROY methods for
> BLOCK. It would be helpful to have an EXISTS method to test if a user
> is BLOCKed similar to the friendship exists method:
> http://apiwiki.twitter.com/REST+API+Documentation#exists. The
> application I'm writing would benefit from such a method method.

Part of the value of blocking, though, IMHO, is that an arbitrary blocked
user *can't* query to find out who else is blocking him or her. While this
isn't the same as giving them a list, it still makes it easier to piece
things together, the way I see it.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Careful with that Axe, Eugene. -- Pink Floyd -------------------------------

dougw

unread,
Dec 20, 2008, 3:08:03 AM12/20/08
to Twitter Development Talk
Yes, the method should require the user to be authenticated.

On Dec 20, 12:58 am, Cameron Kaiser <spec...@floodgap.com> wrote:
> > The current API doc specifies restful CREATE and DESTROY methods for
> > BLOCK. It would be helpful to have an EXISTS method to test if a user
> > is BLOCKed similar to the friendship exists method:
> >http://apiwiki.twitter.com/REST+API+Documentation#exists. The
> > application I'm writing would benefit from such a method method.
>
> Part of the value of blocking, though, IMHO, is that an arbitrary blocked
> user *can't* query to find out who else is blocking him or her. While this
> isn't the same as giving them a list, it still makes it easier to piece
> things together, the way I see it.
>
> --
> ------------------------------------ personal:http://www.cameronkaiser.com/--
>   Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com

Cameron Kaiser

unread,
Dec 20, 2008, 11:24:45 AM12/20/08
to twitter-deve...@googlegroups.com
> > > The current API doc specifies restful CREATE and DESTROY methods for
> > > BLOCK. It would be helpful to have an EXISTS method to test if a user
> > > is BLOCKed similar to the friendship exists method:
> > > http://apiwiki.twitter.com/REST+API+Documentation#exists. The
> > > application I'm writing would benefit from such a method method.
> >
> > Part of the value of blocking, though, IMHO, is that an arbitrary blocked
> > user *can't* query to find out who else is blocking him or her. While this
> > isn't the same as giving them a list, it still makes it easier to piece
> > things together, the way I see it.
>
> Yes, the method should require the user to be authenticated.

No, I get that. But even blocked users can authenticate, so it doesn't help
block their ability to enumerate.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com

-- Our policy is, when in doubt, do the right thing. -- R. L. Ash -------------

Chris Thomson

unread,
Dec 20, 2008, 12:31:36 PM12/20/08
to twitter-deve...@googlegroups.com
For the proposed EXISTS method for blocks, would that be like the friendship EXISTS method where any two users can be inputted, or would it be just for situations involving the authenticated user?

I personally don't see anything wrong with seeing if *I* blocked a certain user, or if a certain user blocked *me* (you can see that through the web interface with the follow error message).

Cameron Kaiser

unread,
Dec 20, 2008, 1:22:16 PM12/20/08
to twitter-deve...@googlegroups.com
> For the proposed EXISTS method for blocks, would that be like the friendship
> EXISTS method where any two users can be inputted, or would it be just for
> situations involving the authenticated user?
> I personally don't see anything wrong with seeing if *I* blocked a certain
> user, or if a certain user blocked *me* (you can see that through the web
> interface with the follow error message).

I could be wrong about this (pardon me if so), but the message you would get
is simply a generic non-specific message that you can't follow. You'd have
to know why that message appears in order to interpret it as an existing
block.

On the other hand, I can see the use in authenticating as me, and seeing
if *I* had blocked another user, but I don't think it's conducive for
that other user to know that *they* are blocked by me. That gives blocking
a penalty.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com

-- A kindness done today is the surest way to a brighter tomorrow. -- Anonymous

dougw

unread,
Dec 20, 2008, 2:19:30 PM12/20/08
to Twitter Development Talk
In this purposed method, an authenticated user would only be able to
use the EXIST method to determine if she has blocked another user. She
would not be able to use it to determine if another user is blocking
her, and will only be able to query users from her perspective. An
alternative would be to allow an authenticated user to download a list
of users they have blocked rather than query one at a time.
>   Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com

Alex Payne

unread,
Dec 20, 2008, 2:46:28 PM12/20/08
to twitter-deve...@googlegroups.com
We have such a method in the upcoming version of the API. Unless your
project completely depends on this functionality, I'd prefer to wait
until the next version to deliver it.

--
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x

Chris Thomson

unread,
Dec 20, 2008, 2:52:44 PM12/20/08
to twitter-deve...@googlegroups.com
Sounds good.

By the way Cameron, it seems like Twitter has changed the message shown to users who attempt to follow a user that has blocked them, from a generic "something went wrong" message to a blocked message. Through the web it shows: "error|blocked|You have been blocked from following this account at the request of the user.", and it also shows a blocked message when calling the friendships/create/username.format method. :)

Cameron Kaiser

unread,
Dec 20, 2008, 3:01:17 PM12/20/08
to twitter-deve...@googlegroups.com
> Sounds good.
> By the way Cameron, it seems like Twitter has changed the message shown to
> users who attempt to follow a user that has blocked them, from a generic
> "something went wrong" message to a blocked message. Through the web it
> shows: "error|blocked|You have been blocked from following this account at
> the request of the user.", and it also shows a blocked message when calling
> the friendships/create/username.format method.

It seems I misunderstood you -- I was referring to the message the web
interface gives. To my knowledge that has not changed. I'm not wild about
the API giving up the goods, but that's life.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com

-- Experience is the name everyone gives to their mistakes. -- Oscar Wilde ----

dougw

unread,
Dec 20, 2008, 3:07:09 AM12/20/08
to Twitter Development Talk
Yes, the method should require the user to be authenticated.

On Dec 20, 12:58 am, Cameron Kaiser <spec...@floodgap.com> wrote:
> > The current API doc specifies restful CREATE and DESTROY methods for
> > BLOCK. It would be helpful to have an EXISTS method to test if a user
> > is BLOCKed similar to the friendship exists method:
> >http://apiwiki.twitter.com/REST+API+Documentation#exists. The
> > application I'm writing would benefit from such a method method.
>
> Part of the value of blocking, though, IMHO, is that an arbitrary blocked
> user *can't* query to find out who else is blocking him or her. While this
> isn't the same as giving them a list, it still makes it easier to piece
> things together, the way I see it.
>
> --
> ------------------------------------ personal:http://www.cameronkaiser.com/--
>   Cameron Kaiser * Floodgap Systems *www.floodgap.com* ckai...@floodgap.com

dougw

unread,
Dec 20, 2008, 4:58:43 PM12/20/08
to Twitter Development Talk
Word up, Alex. It can wait on our end so no need to escalate.

Thanks!
Reply all
Reply to author
Forward
0 new messages