Closed diehummel closed 2 years ago
Note to self: I don't think I want to build a GUI that supports this, with multiple (how many?) "Authorize" buttons, etc.
However, it might be possible to eventually allow for a filter callback to splice in multiple hosts/bearer tokens and then loop over all of them. (Mastodon users can define apps/tokens themselves on their instance's settings/applications
page, after all.)
$response = wp_remote_post(
esc_url_raw( $this->options['mastodon_host'] . '/api/v1/statuses' ), // <-- would have to adapt this line
array(
'headers' => array(
'Authorization' => 'Bearer ' . $this->options['mastodon_access_token'], // <-- would have to adapt this line
),
'data_format' => 'body',
'body' => $query_string,
'timeout' => 15,
)
);
Alternatively, store Mastodon settings in user meta rather than site options.
Hi,
more a feature request question. Would be great to be able to post on multiple mastodon site.
Seems currently the plugin can connect to just one instance.
br