Blogger Robert Alai and a prison officer based in Mandera have been arraigned in Nairobi.
Mr Alai and Mr Patrick Robert Safari were arrested and taken to court after police accused them of being sympathisers of Somalia-based Al-Shabaab terror group.
Mr Alai with his co-accused were presented before Senior Resident Magistrate Tobiko Sinkiyan on Wednesday afternoon.
According to the anti-terror police who arrested the accused, the two posted online photos of officers who were killed in the June 15 terror attack in Wajir.
Police on Wednesday told the court that the photos Mr Alai posted on Twitter were taken by Al-Shabaab at the scene of the attack and sent to the duo.
Police therefore want their links with terrorists further investigated over the next 30 days.
"This is a sensitive matter, it involves various agencies and officers who will interview them to confirm their associates and terror links," prosecution said.
But defence lawyers opposed the application, saying Mr Alai and Mr Safari have known homes and places of work hence no need for the long detention.