Joined: 3/20/2008
Blog Posts: 4
Subscribers: 0
Comments: 13
Blog Views: 18
[x] Viewing entries with tag: twitter
Twitter
11/11/2013
Figured I'd write an informal blog post for a change of pace. Been working on getting twitter up and running on the site and so far I just have two issues to tackle. One is pretty much figured out, the second is a bit of an annoyance and there is no trick to get around it.
 
Limiting Tweets
First off while twitter does not have a specific rate limit for tweets, there are application limits and user limits. To avoid potential problems I plan on using a loose rate limit system. This system is also a prototype that may be used on other areas of the site. The overall process is fairly simple.
The advantage of the above method is you'll be able to post up to 5 tweets within a 5 min interval. To give you a better idea of this method I'll give you 2 examples:
 
Example 1
Action: User posts 5 tweets within 1 minute.
Cause: User will have to wait 1 minute to post to twitter again.
 
Example 2
Action: User posts 3 tweets within 1 min and waits 2 minutes.
Cause: User can now post 4 additional tweets.
 
As you can see this is a far better method than requiring a user to wait 1 min between posts and is very cheap to do code wise.
 
SMS Commands
This is the biggest issue right now. Right now twitter has around 50 special commands for tweets as described here: https://support.twitter.com/articles/14020-twitter-for-sms-basic-features
 
The problem with this is I'm now forced to restrict 35 key words from the start of all tweets. The words are shown here:
 

ON
OFF
FOLLOW
UNFOLLOW
LEAVE
STOP
QUIT
END
CANCEL
UNSUBSCRIBE
ARRET
D
M

RETWEET
SET
WHOIS
W
GET
FAV
FAVE
FAVORITE
FAVOURITE
*
STATS
SUGGEST
SUG

S
WTF
HELP
INFO
AIDE
REPORT
REP
BLOCK
BLK
G

Note: Don't worry you'll be able to *hugs* as much as you want! Just no "* "hugs.

This proves to be a big annoyances and according to responses on the dev forum. There's no way around it or are there plans to allow it in the future. I've tried a few hacks and none seem to work.

As a result I'm stuck with having to modify posts. The quickest option would be to just be to remove these words from the start. However, a better option from what I can tell is to simply change tweets in the following way:

WTF people! => WTF-people!
On the way to my friends house! => On-the way to my friends house!

The downside of this is it looks kinda lame having On-the. Sadly there is no other option unless I can find a better character. I may also look into posting a warning if anyone uses a special word at the start of a tweet.

Anyway, let me know your thoughts. I'm hoping to have this done by tonight or sometime tomorrow.

Nyo

    Achievement!
    Document the discovery of a new anime.
    #38646;