sample code of connecting sns