GithubHelp home page GithubHelp logo

web5design / twit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from timpietrusky/twit

0.0 3.0 0.0 60 KB

Your Custom Twitter Widget : "Embed Tweets The Right Way". THIS REPO IS NO LONGER OPERATIONAL DUE TO THE TWITTER API RESTRICTING UNAUTHENTICATED API CALLS. THE SOLUTION IS TO USE THEIR EMBEDDABLE TIMELINE…YUCK!

Home Page: http://twit.grayghostvisuals.com

twit's Introduction

twit v0.0.7

Your Custom Twitter Widget : "Embed Tweets The Right Way"

DEMO

http://twit.grayghostvisuals.com

TWIT'S RECIPE

index.html


<head>
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>

<!-- Twit -->
<script src="js/twit.js" async></script>
</head>

<body>
<!-- twit -->
<div id="twit-container">
    <ul id="twitter_update_list">
        <li id="twitter_feed"></li>
    </ul>
</div>
<!-- twit -->
</body>

USERNAME and TWIT DISPLAY SETUP

twit.js


// Load Twit
window.onload = function() {
    var ajax_load            = "<img class='twit-loader' src='img/loading.gif' alt='Loading...'>",
        twitter_preferences  = {
            count    : [enter_twit_count_here],
            username : '[username_goes here]'
            retweets : [false, true],
            replies  : [false, true]
        },
        twitterUrl = 'http://twitter.com/statuses/user_timeline.json?screen_name=' + twitter_preferences.username + '&callback=twitterCallback&count=' + twitter_preferences.count + '&include_rts=' + twitter_preferences.retweets + '&exclude_replies=' + twitter_preferences.replies;
        script     = document.createElement('script');

    $("#twitter_feed").html(ajax_load);

    script.setAttribute('src', twitterUrl);
    script.setAttribute('async', true);

    document.body.appendChild(script);
};

GOTCHYAS

  1. Unauthenticated Twitter API calls are permitted 150 requests per hour https://dev.twitter.com/docs/rate-limiting

  2. Retweets and favorites will not display currently. Only single user tweets will display at the moment (this will eventually change)

IN THE PIPELINE

  1. jQuery Plugin → checkout our jQueryPlugin feature branch

  2. Due to unauthenticated Twitter API requests being limited to 150 per hour we're working out a way to cache them properly. Feel free to chime in if you have a better way or are great with Twitter's oAuth (350 per hour)

UPDATES AND NEWS

August 16, 2012 – API v1.1 migration period

  1. Version 1.1 of the Twitter API. https://dev.twitter.com/blog/changes-coming-to-twitter-api
    • required authentication on every API endpoint
    • a new per-endpoint rate-limiting methodology
    • changes to our Developer Rules of the Road, especially around applications that are traditional Twitter clients.

CONTRIBUTING REQUIREMENTS

  1. No Whitespace
  2. Play Nice
  3. Keep it simple stupid
  4. Use a clean branching model with forks (We use Gitflow Model w/SourceTree: Master → Develop → Feature → Hot Fix → Release)
  5. Don't shoot the bird

CONTRIBUTORS

We would like to thank the following contributors and their awesome-nesses...

Tim Pietrusky

  1. JSHint corrections (twit.js)
  2. Callback Function Rewrites (twit.js)
  3. Twitter API Unauthenticated calls research

twit's People

Contributors

grayghostvisuals avatar

Watchers

JT5D avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.