snarfed / bridgy

📣 Connects your web site to social media. Likes, retweets, mentions, cross-posting, and more...
https://brid.gy
Creative Commons Zero v1.0 Universal
740 stars 52 forks source link

How do we syndicate person-tags to multiple targets? #765

Closed jonnybarnes closed 7 years ago

jonnybarnes commented 7 years ago

I made a note including a person-tag, I think.

The note is here: https://jonnybarnes.uk/notes/F4

The main HTML is (massively prettyfied to see what I’m doing):

<div class="h-entry">
    <div class="note">
        <div class="e-content p-name">
            <p>It’s Disneyland day! <span role="img" aria-label="grinning squinting face">😆</span><span role="img" aria-label="grinning squinting face">😆</span><span role="img" aria-label="grinning squinting face">😆</span></p>
            <p>Get psyched
                <span class="u-category h-card mini-h-card">
                    <a class="u-url p-name" href="http://www.sophierydermusic.com">
                        Sophie Barnes
                    </a>
                    <span class="hovercard">
                        <a class="u-url" href="https://www.facebook.com/509615391">
                            <img class="social-icon" src="/assets/img/social-icons/facebook.svg"> Facebook
                        </a>
                        <a class="u-url" href="https://twitter.com/sophieryder">
                            <img class="social-icon" src="/assets/img/social-icons/twitter.svg"> sophieryder
                        </a>
                        <img class="u-photo" alt="" src="/assets/profile-images/default-image">
                    </span>
                </span>
            </p>
        </div>
    <div class="note-metadata">
         <!-- syndication links for facebook and twitter and the like -->
    </div>
</div>

It then gets syndicated in a way I don’t want. I edited the Facebook copy, but here’s the twitter copy: https://twitter.com/i/web/status/892644956954927105

It’s Disneyland day! 😆😆😆

Get psyched Sophie Barnes Facebook sophieryder (https://jonnybarnes.uk/notes/F4)

It hasn’t swapped the name Sophie Barnes for the Twitter handle @sopehieryder, and it’s left in info regarding her Facebook username. The orginal Facebook POSSEd copy, was the inverse, not mentioning Sophie and leaving in her twitter handle.

Is it possible to POSSE person-tags to both facebook and twitter, and if so how?

snarfed commented 7 years ago

hey, thanks for trying person tags, and sorry for the trouble!

twitter person tags aren't actually supported right now. bridgy docs, details. twitter itself only allows them with photos, and they're not exposed in the API at all.

as for the text that ends up in the POSSE copies, bridgy generally doesn't modify that. it's been an ongoing debate; details in https://snarfed.org/2015-11-29_keep-bridgy-publish-dumb . i don't know how you'd do it with your hovercard UX, but you could move the u-category silo links outside e-content, render their link text with CSS instead of in HTML (maybe?), or use e.g. p-bridgy-facebook-content to set the entire POSSE content manually.

snarfed commented 7 years ago

as a data point, here's an example of how @tantek includes person tags across web and silos: http://tantek.com/2015/341/t3/indiewebcamp-sf-building-future-web-mozilla

jonnybarnes commented 7 years ago

Hmm, if the info is available, I’d want my note to say

Hi <a href="https://joebloggs.com" >Joe Bloggs</a>

and then the Twitter POSSEd copy to be

Hi @joebloggs

Given Joe Bloggs has website https://joebloggs.com and twitter handle @jeobloggs.

Is that possible?

snarfed commented 7 years ago

sorry, no.

there's been lots of discussion of this and similar features, but high level, i think this kind of thing really needs to be inside or tightly coupled with your CMS. imho bridgy publish is the wrong place. details in https://snarfed.org/2015-11-29_keep-bridgy-publish-dumb .

jonnybarnes commented 7 years ago

So one option is to do the swap myself and add the text with a p-bridgy-silo-content tag?

Another option on quick searching is trying https://silo.pub, but that’s having TLS errors :(

snarfed commented 7 years ago

So one option is to do the swap myself and add the text with a p-bridgy-silo-content tag?

yup! specifically p-bridgy-twitter-content.

fwiw, this is definitely a common request: #761, #527, #547. i should probably add something to the docs about it.

jonnybarnes commented 7 years ago

Would this work with bridgy?

<div class="e-content p-name">
    <p>Some text with a <a class="u-category h-card" href="https://home.page">person-tag</a></p>
    <img href="/image-i-took-of-them.jpg">
    <p class="p-bridgy-twitter-content">Some text with @mention swapped in</p>
    <p class="p-bridgy-facebook-content">Some text with a <a href="u-category h-card" href="https://facebook.com/profile-id">person-tag</a></p>
</div>
snarfed commented 7 years ago

it should. try previewing it!

also i recommend putting p-bridgy-*-content outside of e-content - example in https://brid.gy/about#silo-content - but up to you.

jonnybarnes commented 7 years ago

I‘ll try leaving the <img> inside the e-content, and moving the p-bridgy-*-content outside.

snarfed commented 7 years ago

if you want to POSSE image(s), you'll want to add class="u-photo".

jonnybarnes commented 7 years ago

I think I have this working as I want now using p-bridgy-silo-content.

snarfed commented 4 years ago

still no Twitter API support for this as of June 2020. latest post on the forum i can find is from 2018: https://twittercommunity.com/t/photo-tagging-feature/82716/4?u=schnarfed