Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow button #145

Closed
alexture opened this issue May 1, 2022 · 9 comments
Closed

Follow button #145

alexture opened this issue May 1, 2022 · 9 comments

Comments

@alexture
Copy link

alexture commented May 1, 2022

Hi! I'd love to put a follow button on my blog, rather than tell people "go follow @name@domain.com". 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?

@mediaformat
Copy link
Collaborator

Duplicate of #14

@stale
Copy link

stale bot commented Aug 31, 2022

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 stale bot added the [Status] wontfix This will not be worked on label Aug 31, 2022
@pfefferle
Copy link
Member

Keep

@stale stale bot removed the [Status] wontfix This will not be worked on label Aug 31, 2022
@mwt
Copy link

mwt commented Sep 4, 2022

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.

@Cambridgeport90
Copy link

Cambridgeport90 commented Sep 5, 2022 via email

@mwt
Copy link

mwt commented Sep 5, 2022

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 @username@instance.tld. 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/

@stale
Copy link

stale bot commented Jan 13, 2023

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 stale bot added the [Status] wontfix This will not be worked on label Jan 13, 2023
@pfefferle
Copy link
Member

Keep!

@stale stale bot removed the [Status] wontfix This will not be worked on label Jan 13, 2023
@pfefferle
Copy link
Member

We added a follow block in the newest version!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants