Kenyans have been using the hashtag #KenyansMessageToObama to advise the U.S. president against any attempt to challenge LGBT rights in the country.
The hashtag has gained traction among the religious right in Kenya ahead of Obama's visit next month.
The comments come after Kenyan House Majority Leader Aden Duale criticized the US's legalization of same-sex marriage last month, citing the need to "avoid the destruction of our society at the behest of negative foreign influences.”
In Kenya, same-sex sexual acts are still a punishable crime, with those found guilty facing up to 14 years jail time.
There have also been anti-gay rallies in anticipation of Obama's arrival.
However some Twitter users have been criticizing those using the hashtag to spread anti-gay sentiment.
Some Twitter users are taking Obama's visit less seriously. This tweeter joked about improved transport infrastructure thanks to the upcoming visit.
Other young men have been encouraging the president to bring his daughter along on the visit.
The US leader's trip to his father's native land will coincide with the 2015 Global Entrepreneurship Summit, a meeting for companies, governments, and business leaders.
Rachael Krishna is a reporter for BuzzFeed News and is based in London.
Contact Rachael Krishna at firstname.lastname@example.org.
Got a confidential tip? Submit it here.