keccers pfp
keccers
@keccers.eth
How are you supposed to set up a SHARE TO FARCASTER button so that it works in a v2 Frame, on both mobile and desktop? πŸ€— the question of the evening....
4 replies
0 recast
10 reactions

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
Did you figure this out? I recently did it (2 days ago) and happy to share
1 reply
0 recast
0 reaction

keccers pfp
keccers
@keccers.eth
cc @jc4p no we really didn't we noticed that there are two prefixes farcaster:// and https://warpcast and that you need the former for mobile, and the latter for desktop? this seems to work but it is kind of janky. in other people's implementations the cast modal breaks out of the frame. the above resulted in a cast modal that loaded in the frame, and was weird...
2 replies
0 recast
2 reactions

Kasra Rahjerdi pfp
Kasra Rahjerdi
@jc4p
works on mobile: shareLink.href = `farcaster://~/compose?text=${encodedText}&embeds[]=${encodedImage}&embeds[]=${encodedAppUrl}`; works on desktop: shareLink.href = `https://warpcast.com/~/compose?text=${encodedText}&embeds[]=${encodedImage}&embeds[]=${encodedAppUrl}`; idk why
1 reply
0 recast
2 reactions

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
ah recently learned you need to use openUrl so you want sdk.actions.openUrl(`https://warpcast.com/~/compose?text=${encodedText}&embeds[]=${encodedImage}&embeds[]=${encodedAppUrl}`)
2 replies
0 recast
0 reaction

Kasra Rahjerdi pfp
Kasra Rahjerdi
@jc4p
i love you
1 reply
0 recast
1 reaction

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
All credit to frame daddy @deodad who helped me fix this earlier
1 reply
0 recast
0 reaction

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
Oh and also THANK YOU for adding share buttons. You get it. https://warpcast.com/sayangel/0xe840c8e9
1 reply
0 recast
0 reaction

keccers pfp
keccers
@keccers.eth
There’s a generated graphic on share! We know!!!!!! But Angel, we found out that when you do this, and try to share a cast + image + your frame And the user wants to put in their own text β€” add to the default you have provided or edit it in any way It nukes the second embed, and removes your frame!!!! 😝 πŸ€¦πŸΌβ€β™€οΈ https://warpcast.com/jc4p/0x81dfcf4a
1 reply
0 recast
1 reaction

Angel - Not A Bot pfp
Angel - Not A Bot
@sayangel
Yes! Thank you. What I’ve done before is make a unique share url with params for to make the frame preview your custom image Easiest and hackiest is something like cocktail[dot]kasra[dot]com/share?cocktails=alltheencodedtextyouwant I haven’t done enough v2 dev to know if this still works but try it!
1 reply
0 recast
0 reaction