Skip to content

Instantly share code, notes, and snippets.

@cored
Created September 27, 2009 21:12
Show Gist options
  • Save cored/195012 to your computer and use it in GitHub Desktop.
Save cored/195012 to your computer and use it in GitHub Desktop.
@tweets = current_user.links_in_timeline(:page => params[:page])
def links_in_timeline(pager = 1)
links = []
client.friends_timeline.each do |timeline|
links << timeline if timeline =~ %r{https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?}
end
links
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment