Code Monkey home page Code Monkey logo

tweetable's Introduction

Deprecation notice

This plugin was based on a now depricated version of the twitter API and is no longer maintained. This code doesn't work anymore. The original readme is below:

Tweetable - A jQuery plugin for displaying twitter feeds

Website : http://theodin.co.uk
Twitter : @philipbeel

Description

Tweetable is a lightweight jQuery plugin that enables you to display your twitter feed on your site quickly and easily. More than just displaying the feeds you can highlight @replys as well as links being dynamically generated for ease of use.

IE Usage

Please note that IE is no longer supported by this plugin.

Usage

Call in the jQuery framework and jquery.tweetable.js in your webpage

<script type="text/javascript" src="jquery.tweetable.js"></script>

Create an element on your page that you want to call your twitter feed into.

<div id="tweets"></div>

Initiate tweetable on your selected element, pass in the twitter username.

$('#tweets').tweetable({username: 'philipbeel'});

TimeAgo plugin support

Tweetable also supports timeago. for displaying how long ago a tweet was posted. This can be achieved like so:

$('#tweets').tweetable({
	html5: true,
	onComplete:function($ul){
		$('time').timeago();
	}
});

Plugin parameters

limit: {Integer},           	// Number of tweets to show
username: {String},     		// @username tweets to display
time: {Boolean},            	// Display date
retweets: {Boolean},        	// Discount retweets false
replies: {Boolean},         	// Filter out @replies if true
failed: {String}				// Text to display when API returns no results
rotate: {Boolean}				// Displays only one tweet at a time
speed: {Integer}		     	// Speed in milliseconds to display each tweet if rotating
append: {String}				// Appended position
loading: {String}				// Loading tweets text
HTML5: {Boolean}				// Confirm if HTML5 is supported (timeago support)
cacheInMilliseconds {Integer}	// Time to keep the most recent tweets in cache before requesting new ones
onComplete: {Object}			// Function callback after event triggered

Changelog

2.1

  • Added caching for improved performance
  • Made code more moduler

2.0

  • Added suppot for jQuery 1.8 getJSON promise interface
  • Depreciated IE support
  • Added loading message support

1.7.1

  • Changed endpoint to use getmytweets.co.uk

1.7.0

  • Added Qunit test coverage
  • Refactored plugin architecture
  • Added override for plugin defaults object

1.6.0

  • Added Qunit test coverage
  • Added timeago plugin support
  • Optimized variable declarations

tweetable's People

Contributors

bedfordlam avatar crazy4groovy avatar onepixelcitizen avatar peterson avatar philipbeel avatar philipjbeel avatar verygreenboi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tweetable's Issues

Twitter api v1.1

Not working due to api v1. Could you please provide some update or more info related to this.

Thanks & Regards.

Tweetable stopped working [Chrome v.29] [jQuery v.1.10.2]

Browser: Chrome Version 29.0.1547.62 m
jQuery: 1.10.2

Website: thechasemk.co.uk/dev/

Thank you for creating this plugin! I'm using it for a new site, but it is failing to work.

I have followed the steps exactly but all that appears is "Loading tweets...". If I refresh the page "Sorry, twitter is currently unavailable for this user." flashes before "Loading tweets..." is once again displayed.

Will this have anything to do with the new API?

Any help getting this to display is much appreciated.

profile image inclusion against each feed

Your plugin is working in an awesome way where we almost left the hope after the discontinuation of API 1.0

Only thing require is the profile images against each feed.

Is that possible ?

Problem with displayTimeOfTweet

Currently displayTimeOfTweet does not work, the tweet identifier i seems to be overwritten by the index i set in the contained for loop.

statuses user_timeline

Right now this shows search, I would like to show the users timeline.
How do I change this?

$search_string = implode(' OR ', $twitter_names);

// Issue a request for the Twitter search API using the codebird library
$reply = (array) $cb->search_tweets("q=$search_string&count=5");
$result = json_encode($reply);

SSL not valid due to API call

Your call to api.getmytweets.co.uk doesn't honour the protocol for the page so it forces the browser to throw a insecure content warning on SSL pages. Not sure if they offer their service over SSL.

Load time

I'm using this plugin on a production site. More often than not I get a timeout and the "Sorry.." message. When tweets do load, its usually after a load time of over 10+ seconds.

No support for multiple accounts with cache enabled

When using caching, multiple accounts dont work on the same domain, since the cache is stored under "tweetable" not something like "tweetable + username", so it only has 1 cache.

This is a simple fix, just add the username to the cache file.

Caching

Is there a way this can be cached?, say for 1 hour or a day? Just so it doesn't refetch on each refresh?

Problem with anchor href and @user ended with "..."

Sample Tweets:

RT @pepe: Noticias SOL - Enoxaparina parece superior a heparina no fraccionada en Ptes que reciben ATC primaria http://t.co/pN3EAJw46

RT @pirulito27: Noticias SOL - Diferencia en mortalidad con cirugía vs angioplastia en diabéticos con múltiples vasos http://t.co/f8QhKPvO

RT @josevpatino: Cambio total de acceso femoral a radial. Similar tasa de éxito y muchas menos complicaciones. http://t.co/Jm9dnNqAKw vía @…

Anchor and @user reference that ends with "..." cannot be accesed or linked.
The data.response only has the textual message and not the complete href anchor.

Twitter

Hi Philip,
I was using this on a few sites. Has twitter blocked it now in favour of their ugly widget or complex new API?

Best,
Jason

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.