Skip to content

Instantly share code, notes, and snippets.

@vrypan
Last active February 16, 2024 07:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrypan/2a2272d73bd66599ecdc85c88995bdf0 to your computer and use it in GitHub Desktop.
Save vrypan/2a2272d73bd66599ecdc85c88995bdf0 to your computer and use it in GitHub Desktop.
Proposal to add get actions to Frames (v3)

Goals

  • Enable the creation of frames that are statically hosted (accessible using HTTP GET vs HTTP POST).
  • Keep it as simple as possible.

Proposal

Add a new fc:frame:button:$idx:action type, get. Modify the use of fc:frame:button:$idx:target prop.

<meta property="fc:frame:button:1" content="Next slide" />
<meta property="fc:frame:button:1:action" content="get" />
<meta property="fc:frame:button:1:target" content="https://..../slide2.html" />

get actions MUST use the https:// or http:// protocols.

Apps MUST validate that the target URL includes a protocol and ignore invalid targets.

Frames MUST specify both an action and a target property for the same button index if action type is get.

Apps MUST reject frames with missing properties as malformed and fall back to the OpenGraph embed.

  • Apps should present get buttons in the same way as post buttons.

When a get button is clicked:

  • The App uses HTTP GET to load the frame at target URL.
  • get actions do not contain any payload.
@vrypan
Copy link
Author

vrypan commented Feb 16, 2024

Some more thoughts:

  1. Re: relative paths. The idea is to make sure that the user does not leave the domain they are. I'm not sure this constrain is needed, when post_url does not have it.
  2. Maybe it would be a good idea to also add a get_external action that opens the URL in the browser. Ideal for "read more", "visit my site" buttons.

@gregfromstl
Copy link

Big fan of this proposal, but how is get_external different from the link action?

@vrypan
Copy link
Author

vrypan commented Feb 16, 2024

@gregfromstl hmmm... It just seems I missed the addition of link to the spec, and I re-proposed it :-)

@vrypan
Copy link
Author

vrypan commented Feb 16, 2024

(v3) I removed get_external.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment