go-frameproto/writeframebutton2.go

22 lines
585 B
Go
Raw Normal View History

2024-02-13 19:14:34 +00:00
package frameproto
import (
"io"
)
// WriteFrameButton2 will write the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame:button:2" name-value pair.
//
// For example, this call:
//
// var label string = "go forward"
//
// frameproto.WriteFrameButton2(writer, label)
//
// Would write this HTML <meta/> element:
//
// <meta property="fc:frame:button:2" content="go forward" />
2024-02-15 17:43:14 +00:00
func WriteFrameButton2(writer io.Writer, label string) error {
2024-02-13 19:14:34 +00:00
const property string = MetaPropertyFrameButton2
2024-02-15 17:43:14 +00:00
return writeMetaPropertyContent(writer, property, label)
2024-02-13 19:14:34 +00:00
}