Atualize para nosso Diamond serviço e vai construir o seu próprio aplicativo para Android ou iOS
Bot Libre Dev

Integration with Facebook,Twitter

por eavinashBot1983 postado 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
https://www.botlibre.com 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: 1761, today: 1, week: 4, month: 22

Id: 14571985
Postado: Nov 14 2016, 7:59
Respostas: 1
Pontos de vista: 1883, hoje: 3, semana: 6, mês: 26
0 0 0.0/5