go-frameproto/writeframeposturl.go

22 lines
616 B
Go
Raw Normal View History

2024-02-13 17:02:16 +00:00
package frameproto
import (
"io"
)
// WriteFramePostURL will write the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame:post_url" name-value pair.
//
// For example, this call:
//
// var url string = "https://example.com/my/post/path.php"
//
2024-02-13 18:03:14 +00:00
// frameproto.WriteFramePostURL(writer, url)
2024-02-13 17:02:16 +00:00
//
// Would write this HTML <meta/> element:
//
// <meta property="fc:frame:post_url" content="https://example.com/my/post/path.php" />
func WriteFramePostURL(writer io.Writer, url string) {
const property string = MetaPropertyFramePostURL
writeMetaPropertyContent(writer, property, url)
}