在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):kawax/laravel-mastodon-api开源软件地址(OpenSource Url):https://github.com/kawax/laravel-mastodon-api开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Mastodon API for LaravelRequirements
InstallationComposer
UsageRegistering an applicationBy Web UI
By APIuse Mastodon;
class MastodonController
{
public function app()
{
$client_name = 'my-app';
$redirect_uris = 'https://my-instance/callback';
$scopes = 'read write follow';
$app_info = Mastodon::domain('https://example.com')
->createApp($client_name, $redirect_uris, $scopes);
dd($app_info);
//[
// 'id' => '',
// 'client_id' => '',
// 'client_secret' => '',
//]
}
} OAuth authenticationUse https://github.com/kawax/socialite-mastodon Save account info.( Get statuses$statuses = Mastodon::domain('https://example.com')
->token('token')
->statuses($account_id);
dd($statuses); Get one status$status = Mastodon::domain('https://example.com')
->token('token')
->status($status_id);
dd($status); Post statusMastodon::domain('https://example.com')->token('token');
$response = Mastodon::createStatus('test1');
$response = Mastodon::createStatus('test2', ['visibility' => 'unlisted']);
dd($response);
Any API by |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论