# Proposals App :: Deeplinking
## 1. Embed deeplinks into casts
The `/dao` and `proposal` routes have the metadata needed for this.
### Examples
**SIMPLE VERSION:** Dynamic Button Text

Shows how to fetch dao data in the page component and populate button text content.
Embed URL:
- <https://proposals.farcastle.net/dao/0xa/0x2a244bb4ccd4eb0897cf61e0c61963e1e1d161e3/POST_SIGNAL>
**code for editing dynamic meta**
- [page.tsx meta](https://github.com/HausDAO/farcastle-proposals-frame/blob/dev/src/app/dao/%5Bchainid%5D/%5Bdaoid%5D/%5Bproposaltype%5D/page.tsx)
**MORE COMPLEX VERSION:** Dynamic Image

Uses the `opengraph_image` component to generate a dynamic image
Embed URLs:
- <https://proposals.farcastle.net/dao/0xa/0x2a244bb4ccd4eb0897cf61e0c61963e1e1d161e3>
- <https://proposals.farcastle.net/dao/0x2105/0x8cd82fc448e714e1bd540ddb679f5269e10d3aa6>
**code for editing dynamic meta + image
- [page.tsx](https://github.com/HausDAO/farcastle-proposals-frame/blob/dev/src/app/dao/%5Bchainid%5D/%5Bdaoid%5D/page.tsx)
- [opengraph-image.tsx](https://github.com/HausDAO/farcastle-proposals-frame/blob/dev/src/app/dao/%5Bchainid%5D/%5Bdaoid%5D/opengraph-image.tsx)
## 2. Sharing deeplinks
- From any app
- TODO: Test from v1 frame redirect button intent
<https://warpcast.com/~/frames/launch?url={{your> deeplink}}
**Example**
<https://warpcast.com/~/frames/launch?url=https://proposals.farcastle.net/dao/0x2105/0xf546247ae6eed166f96d910ea22d42054acbd8cd>
## Launching from a v1 frame intent
Trying, but they both open new windows
```
<Button.Link
// href={`https://warpcast.com/~/frames/launch?url=https://proposals.farcastle.net/dao/${chainid}/${daoid}`}
href={`https://warpcast.com/?launchFrameUrl=https://proposals.farcastle.net/dao/${chainid}/${daoid}`}
>
Make Proposal
</Button.Link>,
```
**url= requires encoding
```
const proposalFrameDeeplink = encodeURI(
`https://warpcast.com/~/frames/launch?url=https://proposals.farcastle.net/dao/${chainid}/${daoid}`
);
```
---
## Dev scratch
**Trial and error**
1. remove 2nd embed
2. rework 2nd embed and play with launch url
3. figure out deeplink formal
this works when pasting into a browser
<https://warpcast.com/?launchFrameUrl=https://proposals.farcastle.net/dao/0x2105/0xf546247ae6eed166f96d910ea22d42054acbd8cd>
1. how can we have a frame embed that launches to a deeplink
2. can we use this launch frame url in a v1 frame intent?
**launch url formats**
<https://warpcast.com/?launchFrameUrl=https%3A%2F%2Ffar.store>
<https://warpcast.com/?launchFrameUrl=https%3A%2F%2Ffc-footy.vercel.app%3Ftab%3Dmatches>
```
I think this is only with root path of your frame, however it redirects to another link in the following format:
https://warpcast.com/?launchFrameUrl=https%3A%2F%2Fapp.payflow.me/farcaster/storage
unfortunately, it works only on desktop
```
```
use ?url= instead of ?domain= if you want to go to a specific route with other params. remember to encode it
domain only works for specifying a frame domain
```
```
we just added support for /~/frames/launch?url=
that can take full urls
```
## Resources
[spec url section](https://docs.farcaster.xyz/developers/frames/v2/spec)
[more](https://framesv2.com/)
## other bits
identify if desktop in a context
```
not at the moment, a good idea to include in context. for now you can look if you're in an iframe or not. if you are you're in web:
isDesktop = () => window.self !== window.top;
```