Lataa avoimen lähdekoodin Bot Libre Community Edition ja asenna Bot Libre omalle palvelimellesi
Bot Libre Dev

Integration with Facebook,Twitter

tekijä eavinashBot1983 Lähetetty Nov 14 2016, 7:59

I have hosted botlibre AI engine at my end.I want to check integration of my bot with Facebook and Twitter.For that I have started looking at the classes responsible for integration like org.botlibre.sense.facebook.FacebookMessaging,org.botlibre.sense.facebook.Facebook,org.botlibre.sense.twitter.Twitter etc.

I understand these are all the senses and senses are responsible for taking input and outputing result.After going through the code I have got following questions

1. If there is a message sent from Facebook messenger how that message would be received by Facebook sense.I didn't see any code where a thread is listening for data.When we say sense.awake() does it only configures that sense or also waits for any input on that ense and if yes how does it waits?

2.In org.botlibre.sense.facebook.Facebook there is a method called checkProfile().Is this method time triggered or I have to explicity schedule this method call.


by admin posted Nov 14 2016, 8:16
1 - Facebook Messenger normally works using a webhook that you need to register with Facebook through a Facebook app. To do this with the Bot Libre AI engine you would need a Java webserver (Tomcat), REST servlet or service, and an https website.

The AI engine is just the AI engine, it does not include a webserver.
See for free Facebook bot hosting.

2 - This method can be used to poll a Facebook profile or page. It would need to have a Facebook app for authentication. You would need to schedule a background task in your Java program to call this method.

Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 1677, today: 1, week: 4, month: 12

Id: 14571985
Lähetetty: Nov 14 2016, 7:59
Vastaukset: 1
Näkymät: 1795, Tänään: 1, Viikolla: 4, Kuukausi: 14
0 0 0.0/5