[twitter-dev] Re: Twitter as a Publish/Subscribe service

2010-08-26 Thread themattharris
Hey VC,

Using Twitter for the purpose you describe seems similar to accounts
which provide a notification about a new blog post or a news article.
In those cases some context is provided about the link in the Tweet so
that the timeline is meaningful to somebody who stumbles across it.
You don't have to do that of course, but consider how an account which
publishes just URLs and tags would appear to others on twitter.com

In terms of the message, if you can fit it into 140 characters and not
post duplications you can post to Twitter. Remember though, the
Twitter API has rate limits, the main one for you being that only 1000
Tweets can be posted per day. There are additional limits which you
can read about on our developer resources website:
  http://dev.twitter.com/pages/rate-limiting

The model of having users subscribe to messages through your
application without having Twitter accounts is your call. As long as
you stay within our Terms of Service there is no problem. The "Rules
of the Road" are available on our developer website:
  http://dev.twitter.com/pages/api_terms

Hope that helps explain a little about the Twitter API in relation to
your idea,
Matt

On Aug 19, 11:44 pm, VirtualCoder  wrote:
> Hi Folks,
>
> I am building an Adobe AiR application in which a community of users
> will be tagging various URL pages.  Whenever someone tags a new URL, I
> need to "broadcast" that new URL to all of the users who have
> installed my AiR application.
>
> Can Twitter API help me with this?
>
> There are a couple of issues to keep in mind.
>
> (1) Only URL's need to be broadcast with a couple of criptic tag-id's
> - so none of this would resemble a typical Twitter message that is
> made up of words and sentences.
>
> (2) The same application would need to "subscribe" to messages from a
> single Twitter user, without forcing application users to create their
> own individual accounts.
>
> If not twitter, is there some other service that provides free and
> reliable messaging services, as described above.
>
> Thanks again,
> VC

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk?hl=en


[twitter-dev] Re: Twitter as a Publish/Subscribe service

2010-08-20 Thread @IDisposable
> (1) Only URL's need to be broadcast with a couple of criptic tag-id's
> - so none of this would resemble a typical Twitter message that is
> made up of words and sentences.

I just asked a related question, where the actual tweet message is not
all that interesting or grokkable.  Ideally I think we want a "back
channel" attribute on the tweet that says "this tweet is unsuitable
for direct human consumption".

> (2) The same application would need to "subscribe" to messages from a
> single Twitter user, without forcing application users to create their
> own individual accounts.

You don't need credentials to consume the search api at 
http://search.twitter.com,
so you can do something as simple as 
http://search.twitter.com/search.js?rpp=100&since_id=xxx&q=from:

where yyy is your tweeting user's screen name and the xxx is the last
tweet that you got from your prior query.  Note that you may miss
messages in this because search doesn't surface every tweet and is
only K-sorted... no guarantees.  More details here 
http://dev.twitter.com/doc/get/search

You could ALSO follow a user/list on the client, but that requires
credentials.

Finally, you could (if a desktop application, for now) consume a
UserStream at each client (or in a proxy server for each), but that
will also require credentials on the client (or proxy) site.

As for acquiring client credentials, you could have a commissioning/
setup process on your side to create those credentials (create user
account, OAuth, follow, etc) and then pass this AccessToken and
TokenSecret to the client applications.  This would have to be
partially manual simply because [THANK ALL THAT IS GOOD AND HOLY]
twitter accounts creation is still not automatable (captchas and all).

> If not twitter, is there some other service that provides free and
> reliable messaging services, as described above.

Well, Twitter is not (sorry guys) what I would call a "reliable
messaging service". It's kind of (potentially) lossy, so you're going
to need a wrapper around that for transactional symantics (like direct
messages back to the producer when the message sequence number --
yours, not the tweet id -- is out of order or skipping) to handle the
retries and such.

Frankly, if you can't handle the lossy nature, you should probably be
looking at something like Amazon's Simple Messaging Service
http://aws.amazon.com/sqs/ or Simple Notification Service 
http://aws.amazon.com/sns/
both are excellent products.

Marc
Hack Prime
Infuz / BuzzRadius / STLTweets