Hey there,
This looks like it’s probably a bug. If a user sets their profile url to http://t.co/ (i.e. http://t.co/timhaines for me) then the user’s entities will report the expanded_url as nil.
{:url=>{:urls=>[{:url=>“http://t.co/timhaines”, :expanded_url=>nil, :display_url=>“t.co/timhaines”, :indices=>[0, 21]}]}
If this is by design (I hope not), then the twitter text library (the js one is the one I noticed this in) needs to be updated to handle expanded_url being nil.
Thanks,
Tim.