你知道机器人的自由,也提供免费的托管 问题跟踪 用于自己的网站或移动应用程序?
Bot Libre Dev

Integration with Facebook,Twitter

通过 eavinashBot1983 发布 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: 1772, today: 0, week: 1, month: 11

Id: 14571985
发布: Nov 14 2016, 7:59
答复: 1
的风景: 1895, 今天: 1, 周: 3, 一个月: 12
0 0 0.0/5