go-frameproto/writeframebutton4target.go

22 lines
656 B
Go
Raw Normal View History

2024-02-13 23:19:32 +00:00
package frameproto
import (
"io"
)
// WriteFrameButton4Target will write the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame:button:4:target" name-value pair.
//
// For example, this call:
//
// var target string = "https://example.com/thing/do-it"
//
// frameproto.WriteFrameButton4Target(writer, target)
//
// Would write this HTML <meta/> element:
//
// <meta property="fc:frame:button:4:target" content="https://example.com/thing/do-it" />
2024-02-15 14:07:06 +00:00
func WriteFrameButton4Target(writer io.Writer, target string) {
2024-02-13 23:19:32 +00:00
const property string = MetaPropertyFrameButton4Target
2024-02-15 14:07:06 +00:00
writeMetaPropertyContent(writer, property, target)
2024-02-13 23:19:32 +00:00
}