1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Adding BB Code Media Sites Using oEmbed

How to add oEmbed (using Twitter as an example)

  1. Error in my cache code...

    Jaxel
    I realized there was an error in my cache code. When the cache expired, it would fail to update the cache properly and produce an error instead...

    These are my fixed codes:
    Code:
    <?php
    
    class EWRcustom_BbCode_Embed
    {
        public static function embedTwitter($mediaKey, array $site)
        {
            $tweetModel = XenForo_Model::create('EWRcustom_Model_Tweets');
           
            if (!$tweet = $tweetModel->getTweetByID($mediaKey, 28))
            {
                $client = new...
  2. Case Study... Caching Tweets

    Jaxel
    So the guide already shows you exactly how to use oEmbed to embed tweets on your forum. However, with the use of oEmbed, there are a few problems.

    The first problem is rate-limiting. Twitter will automatically rate-limit queries to their API, so that websites and users don't bang on their servers too much from outside sources. The second is the inevitability of the Fail Whale. When Twitter goes down, the Zend_Http request will stall as it tries to fetch the oEmbed information; and this can...
    EQnoble likes this.