Posts Tagged xml
Avoid Twitter API-IP Call Limit
Posted by Jeff in ACTIONSCRIPT 3.0 on March 19, 2010
Twitter limits the amount of calls you can make to its API and from one IP to a few hundred an hour. So that means if you have something on the page that is showing your latest tweets, it will only work for the first few hundred people. We have a really high traffic site and needed a more robust solution.
What we did is create a php file that loads the XML from the twitter user timeline (example) and saves it on our server. We setup a chron job to call it every minute. The Flash movie loads the XML file that our php file creates for us ensuring that we will never go over the limit but always have the most up to date content from Twitter displayed on our website.
If you have any questions or want an example of the source, post in the comments. Running Example.
Resources Used:
AS3 – Load XML Document Class Example
Posted by Jeff in ACTIONSCRIPT 3.0 on November 18, 2009
One thing that I do quite often in Flash is load XML. In order to save time, I separated a lot of that code out into external class files. I also created a snippet of code that calls those files in order to save time when I want to use them. (You will need Lee Brimlow’s snippets panel for this to work.)
The LoadXML and LoadURL classes are probably very similar to those found at Learning Actionscript 3 as that is where I learned a lot about this topic previously. Hope you find this helpful!
Load XML files (774.5 KiB, 91 hits)
Code snippet (for the panel) after the break…