Files: b422f0ea714588ae4cdebd501101b463dfc79b01 / tmpl / docs / social / update-your-profile.md
2498 bytesRaw
Each user has a profile, comprised of data published by themself and others. The profile content is controlled by About messages.
Get your ID
Use this command to get your ID:
sbot whoami
sbot.whoami(function (err, info) {
// info.id
})
Set your username
There is no global registry, so you can choose any name you want. (It's recommended you stay alphanumeric.)
sbot.publish({
type: 'about',
about: yourId,
name: name
}, cb)
sbot publish --type about --about {yourId} --name {name}
Replace yourId
and name
with your data.
Here's an example (don't copy this directly):
sbot.publish({
type: 'about',
about: '@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519',
name: 'bob'
}, cb)
sbot publish \
--type about \
--about "@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519" \
--name "bob"
Set a profile pic
First, <a href="/docs/basics/publish-a-file.html">add the image file to the blobstore.</a>
Then, publish this message with the outputted file-ID:
sbot.publish({
type: 'about',
about: yourId,
image: {
link: fileID, // required
width: widthInPx, // optional, but recommended
height: heightInPx, // optional, but recommended
name: fileName, // optional, but recommended
size: sizeInBytes, // optional, but recommended
type: mimeType // optional, but recommended
}
}, cb)
sbot publish \
--type about \
--about {yourId} \
--image.link {fileId} \ # required
--image.width {widthInPx} \ # optional, but recommended
--image.height {heightInPx} \ # optional, but recommended
--image.name {fileName} \ # optional, but recommended
--image.size {sizeInBytes} \ # optional, but recommended
--image.type {mimeType} # optional, but recommended
Here's an example (don't copy this directly):
sbot.publish({
'type': 'about',
'about': '@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519',
'image': {
'link': '&NfP4H4NZCfiPQ6AZ6fEmilbFL8Hz3wTQVeaxbCnNEt4=.sha256',
'size': 347856,
'type': 'image/png',
'width': 512,
'height': 512
}
})
sbot publish \
--type about \
--about "@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519" \
--image.link "&NfP4H4NZCfiPQ6AZ6fEmilbFL8Hz3wTQVeaxbCnNEt4=.sha256" \
--image.size 347856 \
--image.type "image/png" \
--image.width 512 \
--image.height 512
Built with git-ssb-web