wordpress-activitypub icon indicating copy to clipboard operation
wordpress-activitypub copied to clipboard

Follow button

Open alexture opened this issue 2 years ago • 6 comments

Hi! I'd love to put a follow button on my blog, rather than tell people "go follow @[email protected]". But currently, if I click on the mastodon profile, I'm taken to my author page and as far as I understand, there's no way to sign up from anywhere on that page. Is there a link somewhere that can be used and that I've missed? And if so, would you consider adding an option for an automated follow button on author pages?

alexture avatar May 01 '22 09:05 alexture

Duplicate of #14

mediaformat avatar May 01 '22 14:05 mediaformat

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Aug 31 '22 02:08 stale[bot]

Keep

pfefferle avatar Aug 31 '22 09:08 pfefferle

There's a test of this in action with a completely standalone php script here:

https://chriskthomas.com/users/chris/remote_follow

It's just a proof of concept. I'll update this with the source code once it's released.

mwt avatar Sep 04 '22 21:09 mwt

I just followed you… It appears to work from this side of things… haven’t seen a post from you yet, but you’ll be receiving a comment or a like of some sort when I do.

From: Matthew W. Thomas @.> Sent: Sunday, September 4, 2022 5:27 PM To: pfefferle/wordpress-activitypub @.> Cc: Subscribed @.***> Subject: Re: [pfefferle/wordpress-activitypub] Follow button (Issue #145)

There's a test of this in action with a completely standalone php script here:

https://chriskthomas.com/fedi-follow/

It's just a proof of concept. I'll update this with the source code once it's released.

— Reply to this email directly, view it on GitHubhttps://github.com/pfefferle/wordpress-activitypub/issues/145#issuecomment-1236418444, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADS4MACM2OG6PTLOILY3UD3V4UH4DANCNFSM5UZT7XWQ. You are receiving this because you are subscribed to this thread.Message ID: @.@.>>

Cambridgeport90 avatar Sep 05 '22 12:09 Cambridgeport90

I've put up a public general use version that allows your username and instance to be set via query parameters. You can use this service in two ways:

  1. (Simplest) You can share the direct url to your follow page on your WordPress site. The syntax is: https://apfollow.mwt.me/?user=username&instance=instance.tld for a user with the handle @[email protected]. Here is an example of a follow page.
  2. (Harder) You can reverse proxy the service to use it on your own domain. For example, the following rule works in my .htaccess file on LiteSpeed web server:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^users/(.*)/remote_follow$ "https://apfollow.mwt.me/?user=$1&instance=yourdomain.com" [P,E=Proxy-Host:apfollow.mwt.me,L]
</IfModule>

on Apache, it should work with a simpler:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^users/(.*)/remote_follow$ "https://apfollow.mwt.me/?user=$1&instance=yourdomain.com" [P,L]
</IfModule>

This will make the follow page accessible for all users at /users/{username}/remote_follow, which is the same url scheme used by Mastodon.

This should work as a general following service for all ActivityPub sites.

Source code is up on mwt/apfollow. It's licensed AGPL because I took a bunch of frontend from Mastodon.

Edit: There are now some example follow buttons in the readme of the project. Some screenshots (2x scale): Follow me Follow me Follow me

You can paste the html from those sample buttons into the widget block editor to get something similar to #14. You can see an example of this on the left sidebar here: https://chriskthomas.com/

mwt avatar Sep 05 '22 17:09 mwt

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 13 '23 02:01 stale[bot]

Keep!

pfefferle avatar Jan 13 '23 04:01 pfefferle

We added a follow block in the newest version!

pfefferle avatar Sep 14 '23 13:09 pfefferle