gitroomhq / postiz-app

📨 Schedule social media posts, measure them, exchange with other members and get a lot of help from AI 🚀
https://postiz.com
Apache License 2.0
9.81k stars 2.22k forks source link

🚀 Feature: Create a Mastodon status provider #181

Closed MagicFab closed 1 month ago

MagicFab commented 2 months ago

🔖 Feature description

Post the content directly into a Mastodon feed.

🎤 Why is this feature needed ?

Since its creation in 2016, Mastodon has been established as a viable and solid free open source alternative to other social media networks, with microblogging features similar to X but run as a federated social network of a large number of nodes.

There are approximately 10M registered users with about 1M daily active users (source : https://mastodon-analytics.com/).

✌️ How do you aim to achieve this?

Mastodon nodes provide access to publishing posts via a REST API :

https://docs.joinmastodon.org/methods/statuses/

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

Are you willing to submit PR?

Not at this time.

Divyue30597 commented 2 months ago

Hi @nevo-david If this feature is needed. Can I take it up? Thanks!!

nevo-david commented 2 months ago

@Divyue30597 did you manage to run the project on your computer? :)

Divyue30597 commented 2 months ago

I am trying to do that. Going through this doc. Please let me know if I am on right path.

Divyue30597 commented 1 month ago

Hello @nevo-david

I am able to run the project successfully locally. I have few doubts regarding the .env file.

For X, X_CLIENT="Do I have to add ACCESS_TOKEN provided by X or my twitter handle of X?" X_SECRET="Do I have to add ACCESS_TOKEN_SECRET provided by X or my twitter password of X?"

For LinkedIn, Do I need to activate Advertising API ? For that there are some extra permission required that I am not sure of.

Thanks!!

jamesread commented 1 month ago

Hey @Divyue30597 , the advertising API is required for access to the r_basicprofile permission - I hit that issue, too. I'd like to see if it's possible to work around that in the future, but just trying to answer your question.

Divyue30597 commented 1 month ago

Hi @jamesread

Thanks for informing me about this. I was able to run and login (have to do some changes manually in database). I was having issues with resend as well. Apparently I have to verify my domain and I was not able to use public domain. I was not able to understand what the issue was. Because most of the people use public domain as email.

If you can help me out here!! It will be great!!

Thanks!!

Divyue30597 commented 1 month ago

Just Curious. Why am I not able to see X over here? @nevo-david

I have attached the image as well.

Thanks!!

image

jamesread commented 1 month ago

Just Curious. Why am I not able to see X over here? @nevo-david

It was removed from the build because of Twitter's high charges for API usage that affected the SaaS version. You can patch this line to add it back;

https://github.com/gitroomhq/postiz-app/blob/11de46f5b32e313246c5358b34eb3c87f0a220cf/libraries/nestjs-libraries/src/integrations/integration.manager.ts#L20

Just change the whole line to remove the condition, so it looks like this, and rebuild/restart;

    new XProvider(),
jamesread commented 1 month ago

Hi @jamesread

Thanks for informing me about this. I was able to run and login (have to do some changes manually in database). I was having issues with resend as well. Apparently I have to verify my domain and I was not able to use public domain. I was not able to understand what the issue was. Because most of the people use public domain as email.

If you can help me out here!! It will be great!!

Thanks!!

I have to admit, I did setup the resend API key, but when I didn't get the email I just hacked the database as well! I didn't realize that resend required domain verification, but I saw someone else in Discord saying this earlier today.

I will write a patch to have user validation as a configuration option, if @nevo-david would be willing to accept it - but I don't want to bombard him with too much at the moment, I'll see if the other slightly more PRs get accepted :-)

A temporary fix would be to update the docs so people can hack the database to validate users as well, but that would require another PR, so, trying to limit the amount of open ones at the moment!

jamesread commented 1 month ago

Mastodon is now live, and I used it to post! In the last 3 weeks I've been hacking a lot on docs and stuff, really enjoying working on this project!

Closing this thread now :-)