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

Something like this?

tell application "Keynote"
	activate
	tell front document
		tell the first slide
			set mytitlename to object text of default title item
		end tell
	end tell
end tell
Applescript to get title from Keynote slide
 
 
Q