# Node.js daemon that publishes a Discourse post to Facebook Group

**URL:** https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596
**Category:** Extras
**Created:** [July 21, 2017, 12:13pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596 "2017-07-21T12:13:42Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![engross](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/engross/32/120644_2.png) [@engross](https://meta.discourse.org/u/engross)
#### Post date: [July 21, 2017, 12:13pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/1 "2017-07-21T12:13:42Z")

</div>

I am sharing a simple utility I created.

It’s a simple Node.js daemon that publishes a Discourse post to Facebook Group.

[https://github.com/jsdevkr/discourse-facebook-auto-publish](https://github.com/jsdevkr/discourse-facebook-auto-publish)

This is in use on my [jsdev.kr site](https://jsdev.kr) and will be updated continuously.

It would be an honor if you left the github star.

Thank you.

---

<div class="post-metadata">

### Author: ![Jong](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jong/32/122399_2.png) [@Jong](https://meta.discourse.org/u/Jong)
#### Post date: [July 22, 2017, 2:42am UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/2 "2017-07-22T02:42:01Z")

</div>

Awesome! 👍 😄

---

<div class="post-metadata">

### Author: ![Muiran](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/muiran/32/73797_2.png) [@Muiran](https://meta.discourse.org/u/Muiran)
#### Post date: [July 22, 2017, 4:12pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/3 "2017-07-22T16:12:52Z")

</div>

**Brilliant!**  
Thank you, it’s the solution to a problem I didn’t know I had.  
👍🏾

---

<div class="post-metadata">

### Author: ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://meta.discourse.org/u/chi)
#### Post date: [October 9, 2017, 11:25pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/4 "2017-10-09T23:25:56Z")

</div>

@engross so every time someone post at Discourse it automatically post to fb group? Or are there any limitations? Thanks. Nice work on this. I hope it’s can be plugin so no need to run a separate app all the time.

---

<div class="post-metadata">

### Author: ![engross](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/engross/32/120644_2.png) [@engross](https://meta.discourse.org/u/engross)
#### Post date: [October 10, 2017, 6:49am UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/5 "2017-10-10T06:49:47Z")

</div>

@chi There is no limit now.  
Authors can edit or delete immediately after writing, only provide `POSTED_AFTER_MIN` option.

---

<div class="post-metadata">

### Author: ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)
#### Post date: [November 22, 2017, 7:40pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/6 "2017-11-22T19:40:12Z")

</div>

Thanks for creating this… I have a need to publish new topics to a facebook page. How much effort would that require do you think?

or… is it something I can do via webhook?

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [April 7, 2018, 5:30am UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/7 "2018-04-07T05:30:18Z")

</div>

If I remember correctly, Facebook policies prohibit automatic posting without user consent. The API is to help user publish to Facebook, but the process itself should be accompanied by the user.

---

<div class="post-metadata">

### Author: ![PabloC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pabloc/32/49633_2.png) [@PabloC](https://meta.discourse.org/u/PabloC)
#### Post date: [April 7, 2018, 1:51pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/8 "2018-04-07T13:51:15Z")

</div>

Can this be used to poll fb and post on discourse?

By the way, thanks for sharing!

---

<div class="post-metadata">

### Author: ![copopod](https://avatars.discourse-cdn.com/v4/letter/c/82dd89/32.png) [@copopod](https://meta.discourse.org/u/copopod)
#### Post date: [June 29, 2018, 1:40pm UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/9 "2018-06-29T13:40:29Z")

</div>

thanks for this! before we install… does this automatically pull image from the individual post or from the first post in the topic only?

thanks

---

<div class="post-metadata">

### Author: ![thaidb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thaidb/32/68488_2.png) [@thaidb](https://meta.discourse.org/u/thaidb)
#### Post date: [February 19, 2020, 1:40am UTC](https://meta.discourse.org/t/node-js-daemon-that-publishes-a-discourse-post-to-facebook-group/66596/10 "2020-02-19T01:40:58Z")

</div>

Hello,

> [@engross](#):
>
> SITE\_0\_PORT=8080  
> SITE\_0\_POSTED\_AFTER\_MIN=5  
> SITE\_0\_DISCOURSE\_URL=[https://jsdev.kr](https://jsdev.kr)  
> SITE\_0\_FACEBOOK\_GROUP\_ID=jsdevkr  
> SITE\_0\_FACEBOOK\_USER=  
> SITE\_0\_FACEBOOK\_PASS=

Can you change poster from profile facebook to fanpage mannage group facebook that?  
Thank u!
