NEAR-DevHub / neardevhub-contract

DevHub Portal Product Contract (Hosted on NEAR Blockchain) – Includes other instances (e.g. Infrastructure, Events)
https://neardevhub.org
19 stars 15 forks source link

social media links title and description from socialdb app widget metadata #134

Closed petersalomonsen closed 4 months ago

petersalomonsen commented 4 months ago

Get title and description for social media landing page from socialdb, by using web4 preloads querying social db.

You can verify the functionality in the deployment to peterdevhub.near where you can see that the description is set according to the data registered in socialdb.

curl https://peterdevhub.near.page
image

The preload url being used is:

https://rpc.web4.near.page/account/social.near/view/get?keys.json=[%22peterdevhub.near/widget/app/metadata/**%22]

where you can see that name and description from the returned payload matches the title and description in the preview environment metadata tags.

fixes #135

elliotBraem commented 4 months ago

Awesome development-- I saw this and I want to share some related details if they're helpful:

If "Index" is used instead of "app", then it will automatically get a url to HOT Telegram wallet. For example, pokethe.near/widget/Index has https://pokethe.bos.gg/ and https://t.me/herewalletbot/app?startapp=web-pokethe-bos-gg

I've been using "Index" from now on because of this. Although I wouldn't say it's a requirement at all, just a convenient feature.

bos-workspace also supports a "index" field in bos.config.json, see here -- it uses this index to initialize the src when passed a web-component dist, and can be used for building and deploying to web4, from a bos-workspace. Could this json config also influence a web4contract deploy?

frol commented 4 months ago

@elliotBraem Hmm, the HOT link does not work for me. Does it work for you?

elliotBraem commented 4 months ago

I missed this comment @frol -- you're right, it's not working for me anymore either.

Asking in the telegram group: @bosintg

Edit:

they've banned external links. Only a whitelist works