Twitter Integration and Sort_by function