Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fbchat] Update fbchat service with last version v2.0.0a5 #485

Closed
orzechszek opened this issue Mar 21, 2021 · 7 comments
Closed

[fbchat] Update fbchat service with last version v2.0.0a5 #485

orzechszek opened this issue Mar 21, 2021 · 7 comments
Labels

Comments

@orzechszek
Copy link

Please make needed updates for fbchat service to cover changes in last version: https://github.com/fbchat-dev/fbchat - v2.0.0a5

@amotl
Copy link
Member

amotl commented Jun 2, 2021

Dear @orzechszek,

thank you for writing in. Can I humbly ask you to submit a corresponding patch? We will be very happy to accept any patches which improve the situation on this.

With kind regards,
Andreas.

@amotl amotl added enhancement service plugin All about service plugins labels Jun 17, 2021
@amotl amotl changed the title [ Service fbchat ] Update fbchat service with last version in https://github.com/fbchat-dev/fbchat - v2.0.0a5 [fbchat] Update fbchat service with last version v2.0.0a5 Jun 17, 2021
@amotl
Copy link
Member

amotl commented Jun 19, 2021

Hi again,

according to [1], the development/release of the upcoming version 2.0.0 has stalled a bit. So, I figure the current implementation would be still functional?

mqttwarn can be installed with the fbchat package by invoking:

pip install mqttwarn[fbchat]

With kind regards,
Andreas.

[1] https://pypi.org/project/fbchat/#history

@orzechszek
Copy link
Author

orzechszek commented Jul 24, 2021

Hi,

I have a problem with running fbchat module with version 2.0.0a5. I'm getting:

Cannot invoke service for `fbchat'
Traceback (most recent call last):
  File "/opt/mqttwarn/lib/python3.8/site-packages/mqttwarn/core.py", line 502, in processor
    module = service_plugins[service]['module']
KeyError: 'module'

@amotl
Copy link
Member

amotl commented Sep 29, 2021

Hi again,

while I can't verify the whole process, I believe the most recent stable version, fbchat==1.9.7 could still work. On my machine, it only croaks because of wrong credentials, where I am lacking to provide real ones.

On the other hand, when upgrading fbchat by invoking pip install fbchat==2.0.0a5, mqttwarn would error out with

2021-09-29 18:53:02,773 ERROR    [mqttwarn.core             ] Unable to load service "fbchat" from file "/Users/amo/dev/daq-tools/sources/mqttwarn/mqttwarn/services/fbchat.py": No module named 'fbchat.models'
Traceback (most recent call last):
  File "/Users/amo/dev/daq-tools/sources/mqttwarn/mqttwarn/core.py", line 568, in load_services
    service_plugins[service]['module'] = load_module_from_file(modulefile)
  File "/Users/amo/dev/daq-tools/sources/mqttwarn/mqttwarn/util.py", line 164, in load_module_from_file
    return imp.load_source(digest, path, fp)
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 711, in _load
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Users/amo/dev/daq-tools/sources/mqttwarn/mqttwarn/services/fbchat.py", line 9, in <module>
    from fbchat.models import *
ModuleNotFoundError: No module named 'fbchat.models'
2021-09-29 18:53:02,777 CRITICAL [mqttwarn.core             ] Unable to load service "fbchat"

That obviously shows that the current implementation of the service adapter, mqttwarn/services/fbchat.py, is not compatible with fbchat>=2.0 yet, right?

Maybe you can outline what is wrong with the stable version fbchat==1.9.7?

With kind regards,
Andreas.

@amotl
Copy link
Member

amotl commented Aug 21, 2022

Dear @orzechszek,

fbchat-dev/fbchat@916a14062d added an "unmaintained" notice, where fbchat-dev/fbchat#613 has some further discussions.

From there, I also discovered https://github.com/tulir/fbchat-asyncio, https://github.com/JuniorJPDJ/messenger_api, and https://github.com/Schmavery/facebook-chat-api.

Apparently, Facebook now has an official API for chat bots, the »Meta« Messenger Platform. It looks like the HTTP calls outlined on [1,2] would be the right way to submit messages these days.

With kind regards,
Andreas.

[1] https://developers.facebook.com/docs/messenger-platform/send-messages
[2] https://developers.facebook.com/docs/messenger-platform/reference/send-api

/cc @przemas

@amotl
Copy link
Member

amotl commented Aug 21, 2022

Hi again,

as I don't see any future and sense in making the fbchat module work again, we may want to remove it altogether, right? In order to carry on the discussion about a successor service plugin, I've just created #579.

Therefore, I am closing this issue now. Feel free to reopen if you think it is not appropriate.

With kind regards,
Andreas.

@amotl amotl closed this as completed Aug 21, 2022
@AlexanderMoreR
Copy link

AlexanderMoreR commented Jun 6, 2023

Buen dia, hablo español

Me parece muy triste no continuar con el proyecto ya que estoy en un proyecto personal donde responde mensajes por Markeplace de facebook y la api oficial de Facebook no funciona solo de manera empresarial. He dedicado mucho exfuerzo y tiempo para entender esta excelente libreria utilizo la version 1.9 y me funciona muy bien. Si puedo colaborar en algo me pueden comentar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants