Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter app development best practices?

Tags:

twitter

Let's imagine app which is not just another way to post tweets, but something like aggregator and need to store/have access to tweets posted throught.

Since twitter added a limit for API calls, app should/may use some cache, then it should periodically check if tweet was not deleted etc.

How do you manage limits? How do you think good trafficed apps live while not whitelistted?

like image 941
waney Avatar asked Mar 20 '09 12:03

waney


People also ask

Which API is used in Twitter?

The Twitter Ads API is the direct connection to the Twitter Ads platform. Integrate with the Twitter Ads API to enhance the Twitter Ads experience with additional innovation and efficiencies for your business. To apply for Twitter Ads API access, a developer account with Elevated access is required.

Is Twitter API legal?

The use of the Twitter API and developer products to create spam, or engage in any form of platform manipulation, is prohibited. You should review the Twitter Rules on platform manipulation and spam, and ensure that your service does not, and does not enable people to, violate our policies.

Does Twitter support 60 fps?

Frame rate must be 60 FPS or less. Dimensions must be between 32x32 and 1280x1024. File size must not exceed 512 mb. Duration must be between 0.5 seconds and 140 seconds.

Are Twitter bots illegal?

Twitter bots are not illegal.


2 Answers

To name a few.

  • Aggressive caching. Don't call out to the API unless you have to.
    • I generally pull down as much data as I can upfront and store it somewhere. Then I operate off the local store until it runs out and needs to be refreshed.
  • Avoid doing things in real time. Queue up requests and make them on a timer.
    • If you're on Linux, cronjobs are the easiest way to do this.
  • Combine requests as much as possible.
like image 112
Mark Biek Avatar answered Nov 10 '22 14:11

Mark Biek


Well you have 100 requests per hour, so the question is how do you balance it between the various types of requests. I think the best option is the way is how TweetDeck which allows you to set the percentage and saves the rest of the % for posting (because that is important too): alt text
(source: livefilestore.com)

Around the caching a database would be good, and I would ignore deleted ones - once you have downloaded the tweet it doesn't matter if it was deleted. If you wanted to, you could in theory just try to open the page with the tweet and if you get a 404 then it's been deleted. That means no cost against the API.

like image 22
Robert MacLean Avatar answered Nov 10 '22 15:11

Robert MacLean