diff --git a/docs/3rd-party-fediverse-clients.md b/docs/3rd-party-fediverse-clients.md new file mode 100644 index 00000000..42387c4b --- /dev/null +++ b/docs/3rd-party-fediverse-clients.md @@ -0,0 +1,49 @@ +# 3rd party fediverse clients + +A decent number of clients for Mastodon and other Fediverse network are available on almost all devices/OS. This is a list of tested ones. + + +| | Config | Auth | Timeline | Posting | Account | +|---------|---------------|-------|-----------|---------|---------| +|| +| **Desktop** | +| Hyperspace | :negative_squared_cross_mark: +| Mast (Mac) | +| Mastonaut (Mac) | +| TheDesk | :heavy_check_mark: | :negative_squared_cross_mark: +| Tootle (Linux) | :negative_squared_cross_mark: +| Whalebird | :negative_squared_cross_mark: +|| +| **Android** | | | | | | +| AndStatus | :negative_squared_cross_mark: | +| Asap | :negative_squared_cross_mark: | +| Avalanche | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: +| Fedilab | :negative_squared_cross_mark: | +| Mammut | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: +| Subway Tooter | :negative_squared_cross_mark: | +| Tusky | :negative_squared_cross_mark: | +| Twidere | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: +|| +| **iOS** | +| Amaroq | +| iMast | +| Mast | +| Mercury | +| Toot! | +|| +| **Web** | +| Cuckoo+ | :negative_squared_cross_mark: +| Halcyon | :negative_squared_cross_mark: +| Pinafore | :heavy_check_mark: | :negative_squared_cross_mark: +|| +| **SailfishOS** | +| Tooter | + +_This list is not complete and only report which apps have been tested with Nextcloud Social._ + +## Configuration + +Nextcloud Social, being an app for Nextcloud, is hosted in the `apps/` folder and not at the root of the domain meaning the path to the app needs to be configured: +When prompted, use `your-nextcloud/apps/social` as the address of the remote instance of Fediverse. + +However, as shown in the table above, some clients will not allow you to add a path to the address of the instance. diff --git a/docs/List-of-occ-commands.md b/docs/List-of-occ-commands.md new file mode 100644 index 00000000..2f39364b --- /dev/null +++ b/docs/List-of-occ-commands.md @@ -0,0 +1,50 @@ +# List of occ commands + +## ./occ social:cache:refresh + +Command is used to refresh the cache. +Refreshing the cache means: + +- fully recreate Actor Cache for local users +- recreate Actor Cache for remote users with cache older than 24h +- cache document in queue + +Cache refreshing is done ever 15 minutes using the cron from Nextcloud + + +## ./occ social:note:create + +Command test to create post. + +- --replyTo[=REPLYTO] in reply to an existing thread (id of the post) +- --to[=TO] mentioning people (tag someone, or recipient for a direct message +- --type[=TYPE] type: public (default), followers, unlisted, direct + +_ex: ./occ social:note:create --to cult@test.artificial-owl.com --type direct "A message to you"_ + + +## ./occ social:queue:process + +Process the request queue. +Only a small part of request are done directly when using the Social app. Most of the requests are done in a background process. This command will try to execute all awaiting requests. + + +## ./occ social:queue:status + +This command returns details about queued requests for a specific command. Decentralized network means that every remote instance of ActivityPub needs to be updated on action that might affect them in one of those way: + +- Remote instances with users that are following a user of your instance. +- Reply to a message from another instance. +- Direct message to a user from another instance. + +When an action is done, a token is returned. Most of the time this token can be find in the Javascript console log of the browser: + +_./occ social:queue:status --token be63ae0e-ecf4-4386-b645-8a41769de6c6_ + + +## ./occ social:reset + +Reset all data from the Social App. This is a destructive action. +After the reset, the command allows the admin to change the base cloud address, which is used to identify your instance of ActivityPub. + +![./occ fulltextsearch:test](https://raw.githubusercontent.com/nextcloud/social/master/docs/occ_social-reset.png) diff --git a/docs/Testing-the-API.md b/docs/Testing-the-API.md new file mode 100644 index 00000000..c98e4818 --- /dev/null +++ b/docs/Testing-the-API.md @@ -0,0 +1,119 @@ +# Testing the API + +## Creating the App + +This is the first request a 3rd party client would need to send: + +``` +curl -X POST https://your.nextcloud.com/index.php/apps/social/api/v1/apps \ + -d "client_name=curl&redirect_uris=https://test.example.net/oauth/redirected&scopes=write+read&website=https://test.example.net" +``` + +should returns: +> ``` +>{ +> "id": 1, +> "name": "curl", +> "website": "https://test.example.net", +> "scopes": "write read", +> "client_id": "zahscLgi9rZp5SpiOuXGHoqZGAziMhlXVgmTM4Fl", +> "client_secret": "xcDAPQLISsAw4UKqrut1OarDuCXf3IzOJxXQesHs" +>} +> ``` + + + +## Authorize App, identify Account + +Open a browser and go to the generated URL using `client_id`: + + +> https://your.nextcloud.com/index.php/apps/social/oauth/authorize?response_type=code&scope=write+read&redirect_uri=https://test.example.net/oauth/redirected&client_id=zahscLgi9rZp5SpiOuXGHoqZGAziMhlXVgmTM4Fl + + +After authentication, using the credentials of your Nextcloud account, you will be redirected to `https://test.example.net/oauth/redirected?code=VcIgHmSYPYrgrHyM8kRDxf4Gz-dJOuoNBuEz9mlZtw4` + + + +## Obtain token + +Once you have a `code`: + +``` +curl -X POST https://your.nextcloud.com/index.php/apps/social/oauth/token \ + -d "client_id=zahscLgi9rZp5SpiOuXGHoqZGAziMhlXVgmTM4Fl&redirect_uri=https://test.example.net/oauth/redirected&client_secret=xcDAPQLISsAw4UKqrut1OarDuCXf3IzOJxXQesHs&grant_type=authorization_code&code=VcIgHmSYPYrgrHyM8kRDxf4Gz-dJOuoNBuEz9mlZtw4" +``` + +result will be: + +> ``` +>{ +> "access_token": "7UnD7f1fbMUUGqRalX0cTSW5H-Ion40_at560DsvG1w", +> "token_type": "Bearer", +> "scope": "write read", +> "created_at": 1600354593 +>} +> ``` + + +## Testing the API + +- A first request to check the app: + +``` +curl https://your.nextcloud.com/index.php/apps/social/api/v1/apps/verify_credentials \ + -H "Authorization: Bearer 7UnD7f1fbMUUGqRalX0cTSW5H-Ion40_at560DsvG1w" +``` + +should returns + +> ``` +>{ +> "name": "curl", +> "website": "https://test.example.net" +>} +> ``` + + +- Check the account: + +``` +curl https://your.nextcloud.com/index.php/apps/social/api/v1/accounts/verify_credentials \ + -H "Authorization: Bearer 7UnD7f1fbMUUGqRalX0cTSW5H-Ion40_at560DsvG1w" +``` + +should returns + +> ``` +>{ +> "id": "42", +> "username": "cult", +> "acct": "cult", +> "display_name": "cult", +> "locked": false, +> "bot": false, +> "discoverable": false, +> "group": false, +> "created_at": "2020-09-15T13:45:07.000Z", +> "note": "", +> "url": "https://your.nextcloud.com/index.php/apps/social/@cult", +> "avatar": "https://your.nextcloud.com/index.php/documents/avatar/a7ad599c-499a-4680-9f01-e7f57fbea631", +> "avatar_static": "https://your.nextcloud.com/index.php/documents/avatar/a7ad599c-499a-4680-9f01-e7f57fbea631", +> "header": "https://your.nextcloud.com/index.php/documents/avatar/a7ad599c-499a-4680-9f01-e7f57fbea631", +> "header_static": "https://your.nextcloud.com/index.php/documents/avatar/a7ad599c-499a-4680-9f01-e7f57fbea631", +> "followers_count": 2, +> "following_count": 0, +> "statuses_count": 12, +> "last_status_at": "2020-09-15", +> "source": { +> "privacy": "public", +> "sensitive": false, +> "language": "en", +> "note": "", +> "fields": [], +> "follow_requests_count": 0 +> }, +> "emojis": [], +> "fields": [] +>} +> ```