Applescript to get title from Keynote slide

I am trying to get the title of the slides.  But it is not working with apple script, can anyone please help me with this?

This is the code I have written in AppleScript.

tell application "Keynote"
	activate
	
	tell the first slide
		set slideone to first slide of document 1
		
		set mytitlename to title of slideone
		
	end tell
end tell