2024-02-15 15:18:41 +00:00
package frameproto
// AppendFrameButton3Action will append the HTML <meta/> element for the Frame-Protocol's (i.e., Farcaster Frame's) "fc:frame:button:3:action" name-value pair.
//
// For example, this call:
//
// var p []byte
//
// // ..
//
// var buttonAction string = "post"
//
2024-02-15 16:46:46 +00:00
// p = frameproto.AppendFrameButton3Action(p, buttonAction)
2024-02-15 15:18:41 +00:00
//
// Would append this HTML <meta/> element:
//
// <meta property="fc:frame:button:3:action" content="post" />
//
// Note that this package provides some constants to use with AppendFrameButton3Action.
// Namely: ButtonActionLink (for "link"), ButtonActionMint (for "mint"), ButtonActionPost (for "post"), and ButtonActionPostRedirect (for "post_redirect").
//
// Which in code would be used as:
//
2024-02-15 16:46:46 +00:00
// // <meta property="fc:frame:button:3:action" content="link" />
2024-02-15 15:18:41 +00:00
// p = frameproto.AppendFrameButton3Action(p, frameproto.ButtonActionLink)
//
// And:
//
2024-02-15 16:46:46 +00:00
// // <meta property="fc:frame:button:3:action" content="mint" />
2024-02-15 15:18:41 +00:00
// p = frameproto.AppendFrameButton3Action(p, frameproto.ButtonActionMint)
//
// And:
//
2024-02-15 16:46:46 +00:00
// // <meta property="fc:frame:button:3:action" content="post" />
2024-02-15 15:18:41 +00:00
// str :+ frameproto.AppendFrameButton3Action(p, frameproto.ButtonActionPost)
//
// And:
//
2024-02-15 16:46:46 +00:00
// // <meta property="fc:frame:button:3:action" content="post_redirect" />
2024-02-15 15:18:41 +00:00
// p = frameproto.AppendFrameButton3Action(p, frameproto.ButtonActionPostRedirect)
func AppendFrameButton3Action ( p [ ] byte , action string ) [ ] byte {
const property string = MetaPropertyFrameButton3Action
return appendMetaPropertyContent ( p , property , action )
}