tvler,
@tvler@mastodon.social avatar

Damn I'm already so into this and I've been only working on it for like 30m lol. but with social details

tvler,
@tvler@mastodon.social avatar

Better spacing, larger photos, smaller timestring

tvler,
@tvler@mastodon.social avatar

👋 Are there any engineers out there who’d be down to chat with me (a federated eng newbie) about best practices for setting up a lightweight federated server to achieve this new StreetPass UI (see prev posts in thread)?

tvler,
@tvler@mastodon.social avatar

Here’s my best guess for what I think I need to do:

  • Add API endpoints to streetpass.social that returns profile photo, display name & handle for a given federated profile URL (or null if the link isn’t a federated profile)
  • Set up signing keys etc on the backend to handle “secure mode” servers https://docs.joinmastodon.org/admin/config/#authorized_fetch
  • Call this api in my browser extension
booligoosh,

@tvler

For 1Feed I needed to do a similar thing, I think ActivityPub is overkill. I just request the profile URL as HTML then use Cheerio to parse and run selectors on it:

Profile pic - meta[property="og:image"]

Username - meta[property="profile:username"]

For the display name, there's no dedicated attribute. But you can get the <title> and then remove the brackets at the end which contain the known username, leaving the display name.

Secure mode servers still return HTML so that's fine.

tvler,
@tvler@mastodon.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • modclub
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • cubers
  • GTA5RPClips
  • thenastyranch
  • Youngstown
  • rosin
  • slotface
  • tacticalgear
  • ethstaker
  • kavyap
  • Durango
  • anitta
  • everett
  • Leos
  • provamag3
  • mdbf
  • ngwrru68w68
  • cisconetworking
  • tester
  • osvaldo12
  • megavids
  • khanakhh
  • normalnudes
  • JUstTest
  • lostlight
  • All magazines