TwitterX 1.3.7-pl

TwitterX 1.3.7-pl

Released Aug 04, 2015 by qodo

TwitterX

This package loads Twitter feeds/statuses using the new (and very annoying) Twitter 1.1 API now that Twitter API 1.0 has shutdown. You will need to create a Twitter app and get the keys and tokens and call the TwitterX snippet which will load your statuses. This uses a chunk to quickly format the display of your statuses. Example of this in use on my homepage:

http://www.qodo.co.uk

This now supports basic Twitter searches and multiple screen_name values when viewing timelines.

For information and support, check out my blog:

http://www.qodo.co.uk/blog/twitterx-a-new-modx-extra-for-pulling-in-twitter-feeds-using-api-1.1/

Download 445kb (1780 downloads)
Downloads: 8,832
License: GPLv2
Requires Revolution 2.1.x or greater
Supports mysql,sqlsrv

TwitterX v1.3.7

This package loads Twitter feeds and searches using the new (and very annoying) Twitter 1.1 API. You will need to create a Twitter app here: https://dev.twitter.com/apps/new

Once you've created your new application you will need to generate tokens
and use those tokens when you call the TwitterX snippet which will load
your statuses:

Snippet TwitterX

This should be called uncached if you are using :ago in the chunk otherwise it can be cached.

[[!TwitterX?     &twitter_consumer_key=`aaaa`    &twitter_consumer_secret=`bbbb`     &twitter_access_token=`cccc`     &twitter_access_token_secret=`dddd`    &limit=`4`    &timeline=`user_timeline`    &chunk=`TwitterXTpl`    &cache=`7200`      &screen_name=`Qodo` &include_rts=`1` ]]

  • twitter_consumer_key - your twitter consumer token (REQUIRED)
  • twitter_consumer_secret - your twitter consumer secret (REQUIRED)
  • twitter_access_token - your twitter access token (REQUIRED)
  • twitter_access_token_secret - your twitter access token secret (REQUIRED)
  • limit - limit how many statuses to display (default: 5)
  • timeline - which twitter timeline to load (default: user_timeline)
  • chunk - which chunk to load when rendering the statuses (default: TwitterXTpl)
  • cache - how many seconds to cache the twitter data feed (default: 7200)
  • screen_name - which user(s) you want to load (comma separated)
  • include_rts - should this include retweets (default: 1)
  • ** NEW ** exclude_replies - should this exclude replies (default: 0)
  • cache_id - unique ID for caching in case you want to view multiple feeds or different feeds  (default: TwitterX_PAGEID)
  • toPlaceholder - a placeholder ID if you want to use content as a placeholder instead of outputting directly (default: '')
  • toPlaceholderPrefix - if you want to prefix the placeholder values. E.g. 'twitterx' would create placeholders like [[*twitterx.text]] (default: '')
  • search - search Twitter using a search value. When using this parameter, screen_name and timeline are ignored. (example: &search=`MODX`)
  • slug - for when loading a twitter list, you must specify a screen_name and a slug (default: '')

Loading timelines

As the 1.1 API is more restrictive the tweets available have changed. The snippet defaults to user_time line but you can load any of these:

  • public_timeline
  • public_timeline
  • friends_timeline
  • user_timeline
  • mentions
  • retweets_of_me
  • favourites

Loading lists ** New as of 1.3 **

You can now load lists by using the following:   

&timeline=`lists/statuses`    &slug=`NAME_OF_YOUR_SLUG`&screen_name=`SCREEN_NAME_OF_LIST_OWNER`

An example of this would be the MODX List: https://twitter.com/modx/the-modx-team   

&timeline=`lists/statuses`    &slug=`the-modx-team`    &screen_name=`modx`

Searching Twitter

TwitterX now supports basic Twitter searches using the &search parameter:&search=`MODX`

Snippet TwitterXFormat

Use
this snippet in your chunk placeholders to format the status text and
automatically link any search, usernames or
topics:[[+text:TwitterXFormat]]

Chunk options

The package comes with a chunk for displaying the statuses called
'TwitterXTpl'. You can customise this by using the following
placeholders:

  • created_at - date status was created
  • source - source of the Tweet (application like web, iOS etc)
  • id - status id on Twitter
  • text - status main text
  • name - Twitter name
  • screen_name - Twitter username
  • profile_image_url - Twitter avatar image url for this user (uses https as of version 1.3.3)
  • location - This users location
  • url - This users URL (if specified)
  • description - This users profile information

Retweets (where applicable)

  • retweet_created_at - date status was created
  • retweet_source - source of the Tweet (application like web, iOS etc)
  • retweet_id - status id on timeline
  • retweet_id_str - status id on Twitter (twitter.com/user/statuses/id_str)
  • retweet_text - status main text
  • retweet_name - Twitter name
  • retweet_screen_name - Twitter username
  • retweet_profile_image_url - Twitter avatar image url for this user (uses https as of version 1.3.3)
  • retweet_location - This users location
  • retweet_url - This users URL (if specified)
  • retweet_description - This users profile information

Further info

For information and support, check out my blog:

http://www.qodo.co.uk/blog/twitterx-a-new-modx-extra-for-pulling-in-twitter-feeds-using-api-1.1/

Installation Instructions

Install from MODX package manager and follow instructions at http://www.qodo.co.uk/blog/twitterx-a-new-modx-extra-for-pulling-in-twitter-feeds-using-api-1.1/

Changelog for TwitterX package.

TwitterX 1.3.7 - 04/08/2015

  • Bug fix for retweet links not using screen_name (thanks @pmacswebteam)

TwitterX 1.3.6 - 27/08/2014

  • Bug fix for retweet URLs being truncated.

TwitterX 1.3.5 - 05/07/2014

  • Small bug fix and updates for MODX 2.3

TwitterX 1.3.4 - 12/01/2014

  • Fixed bug when specifiying a limit of tweets along with include_rts
  • New option to exclude replies using exclude_replies option

TwitterX 1.3.3 - 31/10/2013

  • Updated to latest version of twitteroauth
  • Added changes from Dameon87 to change twitter profile images to https, sanitise content and improve TwitterXFormat - thanks!
  • Uploaded correct changelog, licence and readme (previous version was for a different extra)

TwitterX 1.3.2 - 04/09/2013

  • Added isset() to some elements to stop warnings/errors

TwitterX 1.3.1 - 23/08/2013

  • Fixed option for favourites (thanks @sepiariver)
  • Added option to prefix TwitterX placeholders

TwitterX 1.3 - 24/07/2013

  • Added option to view user lists

TwitterX 1.2 02/07/2013

  • Fixed twitter search problem - thanks @OostDesign

TwitterX 1.1 12/06/2013

  • Fixed problem where it was ACTUALLY using Twitter 1.0 API instead of 1.1!
  • Changed cached_id to not automatically append _PAGEID
  • Removed $limit+1 - it was always showing 1 more than specified

TwitterX 1.0 23/04/2013

  • Added multiple screen_name option separated by comma, thanks @hvoort
  • Added option to do basic Twitter searches
  • Bug fixes

TwitterX 0.8 - 21/01/2013

  • Added option include_rts to choose whether to include retweets.
  • Added options cache_id and toPlaceholder thanks to @sepiariver to allow for placeholder output and unique caching.
  • Fix for viewing Twitter favourites instead of regular statuses (thanks @sepiariver).
  • Added a few more comments.

TwitterX 0.7 - 01/12/2012

  • Fixed spelling mistake in error message
  • Added test for CURL as it's needed by twitter auth
  • Corrected parameter 'twitter_consumer_token_secret' which should have been 'twitter_access_token_secret' with support for the old

TwitterX 0.6 - 01/12/2012

  • Added option to view other users statuses using &screen_name=`Qodo`

TwitterX 0.5 - 29/11/2012

  • Changed the way we limit the number of tweets - using twitter 'count' parameter instead of a limited loop.

TwitterX 0.4 - 15/11/2012

  • Bug fix for reporting errors (thanks Jeremy)

TwitterX 0.3

  • Added in caching of twitter data to protect against over using twitter limit
  • Added id_str available to chunk (thanks Laurent Mignot)
  • Updated to check for the twitteroauth class first
  • Corrected error in documentation (feed parameter should have been timeline)

TwitterX 0.2

  • First version
Version Released Author Downloads
17 Versions 1 Contributors 8,838 Downloads
1.3.6-pl Aug, 27 2014 Qodo 1,292
1.3.5-pl Jul, 05 2014 Qodo 565
1.3.4-pl Jan, 12 2014 Qodo 899
1.3.3-pl Oct, 31 2013 Qodo 396
1.3.2-pl Sep, 04 2013 Qodo 415
1.3.1-pl Aug, 23 2013 Qodo 255
1.3.0-pl Jul, 24 2013 Qodo 357
1.0.2-pl Jul, 02 2013 Qodo 335
1.0.1-pl Jun, 12 2013 Qodo 514
1.0.0-pl Apr, 23 2013 Qodo 333
0.8.0-pl Jan, 16 2013 Qodo 456
0.6.0-pl Dec, 01 2012 Qodo 321
0.5.0-pl Nov, 30 2012 Qodo 209
0.4.0-beta Nov, 29 2012 Qodo 200
0.3.0-beta Nov, 08 2012 Qodo 262
0.2.0-beta Oct, 30 2012 Qodo 249