I'm looking for a way to get @replies (sorry, I mean "mentions") via SMS.
*ahem*
Ideally this would be an officially supported option
listed in http://twitter.com/devices :-)
*ahem*
But, since it isn't :-)
My idea has been to fetch the
http://twitter.com/statuses/mentions.format every minute or so, check
against a cache of previously sent "mentions" and send the new ones
(as DMs to myself, since I have DMs forwarded to my cell via SMS
already).
This seems HUGELY inefficient (i.e. there will be a LOT of minutes
throughout the day which return no new "mentions") but I can't think
of a more efficient way of getting them in a fairly timely manner.
Thanks for any pointers.
TjL
Why were you blocked?
And there seems to be a lot of competition in this space (SMS Gateway providers) can’t you just go to someone else?
--
Patrick Burrows
http://Categorical.ly (the Best Twitter Client Possible)
@Categorically
As far as actually getting the replies from Twitter -- polling every minute
or so is the only way.
Oh, and if this is for more than just yourself, there are 3rd party SMS
Gateways that know all the formats for the different mobile carriers.
Check out:
http://en.wikipedia.org/wiki/SMS_gateways
--
Patrick Burrows
http://Categorical.ly
@Categorically
-----Original Message-----
From: twitter-deve...@googlegroups.com
[mailto:twitter-deve...@googlegroups.com] On Behalf Of TjL
Sent: Monday, May 11, 2009 1:16 AM
To: twitter-deve...@googlegroups.com
Surya Sravanthi
That sure is odd. I know this is off-topic, but have you tried to see if your customers would be willing to pay for the service you offer?
Actually, it sounds like that is what you are going to have to do…
I've been testing / tweaking it today and it does seem to work.
Basic premise is fairly simple, it checks
"http://twitter.com/statuses/mentions.rss?since_id=$LAST_ID"
where $LAST_ID is stored in a text file as the last ID that was found/forwarded.
I then send the message as a DM to myself, which has the added benefit
of being able to use the http://twitter.com/devices setting for "quiet
hours" already. (I have DMs sent to forward to my cell already)
I also built in some rudimentary filtering to avoid some *people*
(such as reTweet bots) and some regex (such as "RT @tj" and "(via @tj)
since I don't need/want those sent via SMS.
One benefit of using the 'mentions' API vs the search API (which was
what I had originally tried) is that it automatically excludes people
that you have blocked, which search does not.
My plan is to check it out for a few days, and if it seems to work
I'll write up a description of how it works and post the code as well.
If anyone would like to see it in its current state, drop me a note
(preferably offlist, so everyone doesn't have to see it) at
luo...@gmail.com
TjL
That's how I started, but then I realized that people I have blocked
would be sent, and I have a (very) few followers whose updates are
protected, and I wouldn't see there.
Of course as soon as I finished this, I realized that what would be
*better* for my use would actually be email notification of
'mentions', so that's what I'm working on now. The nice thing is that
you're not bound to 140 characters in email, so I can also include
what the message was in_reply_to (I have a few followers who @reply
HOURS later and I often have no idea what they are referring to), and
hopefully even a link to @reply back to them, including a proper
in_reply_to also.
> I remembered trying to do it back in the Track days, but tracking @derek
> failed miserably as it dropped the @ and I instantly got swamped with tweets
> mentioning "derek".
Yeah, I'm thinking about using the search API for a "roll my own"
"track" functionality too.
TjL
Yeah, I'm thinking about using the search API for a "roll my own" "track" functionality too.
and doesn't use any server-side code