3 * @file src/Module/Followers.php
5 namespace Friendica\Module;
7 use Friendica\BaseModule;
8 use Friendica\Protocol\ActivityPub;
9 use Friendica\Core\System;
10 use Friendica\Model\User;
13 * ActivityPub Followers
15 class Followers extends BaseModule
17 public static function init()
21 if (empty($a->argv[1])) {
22 System::httpExit(404);
25 $owner = User::getOwnerDataByNick($a->argv[1]);
27 System::httpExit(404);
30 $page = defaults($_REQUEST, 'page', null);
32 $followers = ActivityPub::getFollowers($owner, $page);
34 header('Content-Type: application/activity+json');
35 echo json_encode($followers);