View on GitHub

jquery-twitter-feed 1.0.1

jQuery Twitter Plugin with Twitter API 1.1 Support

Download this project as a .zip file Download this project as a tar.gz file

Twitter Feed v1.1.0

by Zachary Kniebel

Twitter Feed is a robust and highly customizable jQuery Twitter plugin for rendering tweets passed as JSON objects. The plugin was designed with performance and simplicity in mind, and is completely compatible with Twitter's API 1.1* (more details, below). The plugin includes several examples, including the server-side code necessary for making requests to Twitter, written in both C# and PHP. For those using .NET, Twitter Feed also comes with the initial commit of my new C# Twitter library, TweetNET. More details on TweetNET may be found, below.

TWITTER API 1.1 UPDATE NOTES:

As a result of the new security and authorization requirements that
Twitter included in their API 1.1 update, the support for performing the actual AJAX request to retrieve a user's tweets has been removed. Twitter strongly discourages client-side requests with their new API, as client-side requests would require the exposure of the site's oAuth secrets. As such, I have included support for supplying a the raw, unparsed JSON response from Twitter to the plugin, and have provided both instructions and samples for setting up the necessary account and application on Twitter, and implementing the plugin with .NET and with PHP. For updates and instructions, see the SETUP_INSTRUCTIONS file in the Server-Side Examples directory.

Features:

Twitter Feed Options Object

Dates

The plugin's included parseTweetDate function parses dates based based on when the tweet was created, similar to the way Twitter does on their own site. The date-ranges in the below table represent the time the tweet was created, relative to the current time. These ranges are used as conditional rules for parsing the dates in their corresponding formats.

  [Time Since Tweeting] :    [Parsed Example]

   1 second - 59 seconds :    43 seconds ago  
   1 minute - 59 minutes :    11 minutes ago  
   1 hour   - 23 hours   :    7 hours ago  
   1 day    - XXXXXXXXXX :    Feb 23 '12 

If these formats are not to your liking, you need only replace the parseTweetDate functoin with one of your own.

Optional Link Settings (also applies to date)

Optional link settings are supplied in object literal form. All of the objects representing optional link settings have the following properties:

TweetNET (initial release, only)

TweetNET is a work-in-progress library that I am working on, to better assist developers in connecting with Twitter via C#. TweetNET IS NOT REQUIRED for Twitter Feed, but may be useful for those using C# or .NET, in general. I have included only the initial release in this project, and will only be updating with bug fixes. The initial release includes support for the statuses/user_timeline and statuses/show/:id requests. For future releases, please view TweetNET's official repository, at https://github.com/zkniebel/TweetNet.

VERSION AND RELEASE NOTES:

-- added TweetNET v1.0 --

-- merged v1.1 into master --

v1.1.0 - Major modern browsers, IE7+ support - Improvements to method of ordering optional links - Updated support for parsing JSON in IE7 and earlier

-- created branch for v1.1 -- -- created branch for v1.0 (version backup) --

v1.0.2 (not named in commit comment) - (Initial Commit: 2deb4ec6f1aacfc92b178f7e1f11b8b9dae39298) - Major modern browsers, IE9+ support - Improvements, optimizations and tweaks post Twitter API 1.1 update - Example plugin call

v1.0.1 (beta): - Major modern browsers, IE9+ support - Twitter API 1.1 support - Server-side examples, improved documentation

v1.0 (alpha): - Major modern browsers, IE7+ support - Twitter API 1.0 support


This software is protected under the MIT license, below, and under the Open Source GPL v3.0 license (http://opensource.org/licenses/GPL-3.0).

Copyright (C) 2013 Zachary Kniebel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.