Git Product home page Git Product logo

facebot's People

Contributors

mitchcapper avatar weetbix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

facebot's Issues

Facebook can't login

Hello, this looks like an awesome hack,

However when I try to connect with my credentials I get

Error in login: Couldn't login. Facebook might have blocked this account. Please login with a browser or enable the option 'forceLogin' and try again. 

Is it possible that Facebook has blocked access to this hack?

Better install instruction

Could someone explain exactly how to install this bot? Which API key needs to be used. Is it possible to use on a fanpage ?

Does this still work?

I tried running it on Heroku, but it crashes. Here is the log

2017-11-23T01:43:01.398687+00:00 heroku[worker.1]: State changed from starting to up
2017-11-23T01:43:04.397275+00:00 app[worker.1]: 
2017-11-23T01:43:04.397291+00:00 app[worker.1]: > [email protected] start /app
2017-11-23T01:43:04.397292+00:00 app[worker.1]: > node bin/run_postgres.js
2017-11-23T01:43:04.397292+00:00 app[worker.1]: 
2017-11-23T01:43:06.373593+00:00 app[worker.1]: module.js:340
2017-11-23T01:43:06.373606+00:00 app[worker.1]:     throw err;
2017-11-23T01:43:06.373607+00:00 app[worker.1]:     ^
2017-11-23T01:43:06.373607+00:00 app[worker.1]: 
2017-11-23T01:43:06.373609+00:00 app[worker.1]: Error: Cannot find module 'js-emoji'
2017-11-23T01:43:06.373610+00:00 app[worker.1]:     at Function.Module._resolveFilename (module.js:338:15)
2017-11-23T01:43:06.373610+00:00 app[worker.1]:     at Function.Module._load (module.js:289:25)
2017-11-23T01:43:06.373611+00:00 app[worker.1]:     at Module.require (module.js:366:17)
2017-11-23T01:43:06.373611+00:00 app[worker.1]:     at require (module.js:385:17)
2017-11-23T01:43:06.373612+00:00 app[worker.1]:     at Object.<anonymous> (/app/lib/facebot.js:9:13)
2017-11-23T01:43:06.373613+00:00 app[worker.1]:     at Module._compile (module.js:435:26)
2017-11-23T01:43:06.373613+00:00 app[worker.1]:     at Object.Module._extensions..js (module.js:442:10)
2017-11-23T01:43:06.373613+00:00 app[worker.1]:     at Module.load (module.js:356:32)
2017-11-23T01:43:06.373614+00:00 app[worker.1]:     at Function.Module._load (module.js:313:12)
2017-11-23T01:43:06.373615+00:00 app[worker.1]:     at Module.require (module.js:366:17)
2017-11-23T01:43:06.373615+00:00 app[worker.1]:     at require (module.js:385:17)
2017-11-23T01:43:06.373616+00:00 app[worker.1]:     at Object.<anonymous> (/app/bin/run_postgres.js:7:15)
2017-11-23T01:43:06.373616+00:00 app[worker.1]:     at Module._compile (module.js:435:26)
2017-11-23T01:43:06.373617+00:00 app[worker.1]:     at Object.Module._extensions..js (module.js:442:10)
2017-11-23T01:43:06.373618+00:00 app[worker.1]:     at Module.load (module.js:356:32)
2017-11-23T01:43:06.373618+00:00 app[worker.1]:     at Function.Module._load (module.js:313:12)
2017-11-23T01:43:06.390303+00:00 app[worker.1]: 
2017-11-23T01:43:06.397610+00:00 app[worker.1]: npm ERR! Linux 3.13.0-133-generic
2017-11-23T01:43:06.398232+00:00 app[worker.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2017-11-23T01:43:06.398581+00:00 app[worker.1]: npm ERR! node v4.2.4
2017-11-23T01:43:06.399794+00:00 app[worker.1]: npm ERR! npm  v2.14.12
2017-11-23T01:43:06.400131+00:00 app[worker.1]: npm ERR! code ELIFECYCLE
2017-11-23T01:43:06.400424+00:00 app[worker.1]: npm ERR! [email protected] start: `node bin/run_postgres.js`
2017-11-23T01:43:06.400659+00:00 app[worker.1]: npm ERR! Exit status 1
2017-11-23T01:43:06.400888+00:00 app[worker.1]: npm ERR! 
2017-11-23T01:43:06.401097+00:00 app[worker.1]: npm ERR! Failed at the [email protected] start script 'node bin/run_postgres.js'.
2017-11-23T01:43:06.401347+00:00 app[worker.1]: npm ERR! This is most likely a problem with the facebot package,
2017-11-23T01:43:06.401611+00:00 app[worker.1]: npm ERR! not with npm itself.
2017-11-23T01:43:06.401823+00:00 app[worker.1]: npm ERR! Tell the author that this fails on your system:
2017-11-23T01:43:06.402062+00:00 app[worker.1]: npm ERR!     node bin/run_postgres.js
2017-11-23T01:43:06.402284+00:00 app[worker.1]: npm ERR! You can get their info via:
2017-11-23T01:43:06.402535+00:00 app[worker.1]: npm ERR!     npm owner ls facebot
2017-11-23T01:43:06.411135+00:00 app[worker.1]: npm ERR! There is likely additional logging output above.
2017-11-23T01:43:06.415226+00:00 app[worker.1]: 
2017-11-23T01:43:06.422813+00:00 app[worker.1]: npm ERR! Please include the following file with any support request:
2017-11-23T01:43:06.423088+00:00 app[worker.1]: npm ERR!     /app/npm-debug.log
2017-11-23T01:43:06.575433+00:00 heroku[worker.1]: State changed from up to crashed
2017-11-23T01:43:06.559740+00:00 heroku[worker.1]: Process exited with status 1

Abandoned?

Great after hours tweaking and getting so close, I see no replies here....what gives?

extending database use for more functionality desired?

I have several PR pending but one I haven't submitted yet is for:
https://github.com/mitchcapper/facebot/tree/read_receipts_and_self_logging

it greatly increases database use. I am happy to port the code for postgres (although local may not be possible easily). This will allow for several additional functional features but if this is not needed I will not work to put together a PR and will just leave for myself. In the future it could allow for catching up after disconnects as well.

I would probably code in something to also purge database entries older than 7 days or something as well in the long term.

Also as it has a lot of built-on's I will probably wait for the PR to be merged before submitting this (as it is getting a bit hard to keep things all based off just master).

Logging improvements

I think it would be good to update the logging functionality a bit. I would like to add some more diagnostic logging functions (ie for events etc).

There are a few console.log's in places and then sendDebugMessage as well. I think it might be good to add a central logging function that takes the message and the log level. There would then be two configurable variables I see:
SLACK_LOG_LEVEL, CONSOLE_LOG_LEVEL
that specifies what logging to do to each.
Technically we could also just do one LOG_LEVEL variable and then use the existing DEBUG_MESSAGES env variable to determine if we send the logs to slack. This gives better back compat but sacrifices functionality. Other option is to use the two new variables and then just in code set SLACK_LOG_LEVEL to something reasonable if DEBUG_MESSAGES is specified.

I would recommend something along the lines of CRIT,ERROR,WARN,INFO,DEBUG.

DEBUG would dump all events, and we would now allow SLACK_LOG_LEVEL to be set that high (otherwise a nice loop where informing of the slack message sent would generate another sent message;).

Once we have a design direction I can submit a PR (will wait for some other items first.

Deploy to Heroku error

I tried to deploy the app to Heroku using the button in the README.

This is the log I have inside Heroku

017-04-12T10:08:20.042923+00:00 app[worker.1]: npm ERR! Failed at the [email protected] start script 'node bin/run_postgres.js'.

2017-04-12T10:08:20.043207+00:00 app[worker.1]: npm ERR! not with npm itself.

2017-04-12T10:08:20.043049+00:00 app[worker.1]: npm ERR! This is most likely a problem with the facebot package,

2017-04-12T10:08:20.043442+00:00 app[worker.1]: npm ERR!     node bin/run_postgres.js

2017-04-12T10:08:20.043876+00:00 app[worker.1]: npm ERR!     npm owner ls facebot

2017-04-12T10:08:20.043327+00:00 app[worker.1]: npm ERR! Tell the author that this fails on your system:

2017-04-12T10:08:20.043688+00:00 app[worker.1]: npm ERR! You can get their info via:

2017-04-12T10:08:20.046829+00:00 app[worker.1]: 

2017-04-12T10:08:20.044001+00:00 app[worker.1]: npm ERR! There is likely additional logging output above.

2017-04-12T10:08:20.047143+00:00 app[worker.1]: npm ERR!     /app/npm-debug.log

2017-04-12T10:08:20.047037+00:00 app[worker.1]: npm ERR! Please include the following file with any support request:

Deplyment

Hi,
I am inexperienced in coding, tried to deploy an app and nothing happened. it said this:

2017-09-17T20:55:05.211982+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
 2017-09-17T20:55:05.212145+00:00 app[web.1]: npm ERR! node bin/run_postgres.js 
2017-09-17T20:55:05.212307+00:00 app[web.1]: npm ERR! You can get their info via: 
2017-09-17T20:55:05.212466+00:00 app[web.1]: npm ERR! npm owner ls facebot 
2017-09-17T20:55:05.212741+00:00 app[web.1]: npm ERR! There is likely additional logging output above.

in the log. did I omit sth?

Support for 2fa authentication

I'm trying to set this bot up with my facebook account, however I'm running into an issue with it not being able to handle login with two factor authentication.

Judging from the documentation at https://github.com/Schmavery/facebook-chat-api/blob/master/DOCS.md#login this can be done, but it seems some modification to the current calls will need to be made.

I'm not proficient in JS or the Q module which is being used to call the facebook chat api.

The error specifically from the log is

info Logging in... 
ERR! Error in login: login-approval

/home/facebot/node_modules/facebot/node_modules/q/q.js:155
                throw e;
                ^
[object Object]

Authorizing it via the browser does not help to bypass authentication as facebot does not seem to store any cookie (postgresql) so it will be seen as a new browser on every start.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.