Skip to content

Instantly share code, notes, and snippets.

@iamphill

iamphill/twitter.md

Last active Aug 29, 2015
Embed
What would you like to do?
Access Twitter timeline with JS

https://cdn.syndication.twimg.com/widgets/timelines/[WIDGET URL]?suppress_response_codes=true&callback=?

Create a Twitter embed widget and then take the ID number from URL and swap the [WIDGET URL] with this ID. Then just use as you wish to get access to the data. With jQuery I use..

$.getJSON('https://cdn.syndication.twimg.com/widgets/timelines/[WIDGET URL]?suppress_response_codes=true&callback=?', function (data) {
  var $html = $(d.body)
  // Do something with the return HTML
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.