Federal employees can check their social media accounts on their own phones during work breaks, but cannot “like,” “share,” “follow” or otherwise show support for political candidates or parties, according to new guidance released Tuesday.

At home, employees are generally free to use their social media accounts as they like. But they would run afoul of the Hatch Act, which prevents employees from politicking on government time, if they promote politicians while on work time.

Using Twitter accounts to raise money is illegal no matter when it happens, said the Office of Special Counsel, which governs Hatch Act violations.

“With social media so accessible, employees want to know what political activity they can and can’t engage in on Facebook, Twitter, and other sites and stay clearly within the law,” said Henry J. Kerner, special counsel.

Those rules have been tested by the ubiquity of smart phones and access to the internet even during work, when employees may think they’re on a break and on their own time.

The agency’s guidelines tell employees they can list their official work titles on social media profiles, but they cannot fundraise or promote a politician or political party.

They also are prohibited from using an alias on social media to solicit support for a candidate, political party or advocacy group.

Using an alias to get around the rules is also forbidden, the new guidance says.

The rules come after a United States Postal Service employee received a 50 day suspension for wearing a Sen. Bernard Sanders sticker on his uniform during the 2016 campaign.

The employee had also made more than 100 posts online in support of Mr. Sanders, and “anti” both Donald Trump and Hillary Clinton.