I am currently creating Twitter client application. It's just like Tweetdeck or something similar. The different is it's web based and using Codeigniter and Elliot Haughin Twitter Library.
I was able to do Oauth and call the twitter home_timeline, user_timeline, and mentions using serverside script. Also, i was able to display those data on the webpage and refresh it every 30 seconds using Jquery. The problem is the Twitter RESTAPI rate limitation only give a specific IP address 150 request per hour. With the 30 per second ajax call I made via Jquery, it make my server able to do 120 request to twitter API. The rest 30 requests left is not a problem if I have only one user assuming he/she is only make update status less than 30 req per hour. But, I am sure the more serious problem will occur when I have more user registered to my server.
A friend suggested me to call twitter API directly from jquery so the server side don't need to make a call. It works, but only for public method such as displaying user_timeline. When i tried to call the home_timeline or mentions, the twitter return "401 - authorized error". I understand that the call need OAuth to fulfill the request. My questions:
- If it so, do I need to include my user request token and secret token along with the call?
Please help me. I really appreciate any solution from you guys.