davidchua / pymessenger

A Python Wrapper for the FB Messenger Bot API (Send/Receive API)
MIT License
457 stars 183 forks source link

Getting user info and Get Started #28

Closed wessilfie closed 7 years ago

wessilfie commented 7 years ago

I was digging through the code and noticed a get_user_info method for getting the Facebook info for a given sender, however when I call it, I get an error that it is not part of the bot class. Examples of how I've tried to call it user_info = bot.get_user_info(recipient_id, fields=None) user_info = bot.get_user_info(bot, recipient_id, fields=None)

Also, does this wrapper yet support having a Get Started and/or persistent menu?

Cretezy commented 7 years ago

That's strange, it should work. What's the exact error? https://developers.facebook.com/docs/messenger-platform/user-profile

However, for the second question, it doesn't need to support it, as that is a single-time operation. You can look at https://developers.facebook.com/docs/messenger-platform/thread-settings for information on setting that up.

wessilfie commented 7 years ago

I get this error AttributeError: 'Bot' object has no attribute 'get_user_info' with both formats. I'm just trying to collect user_ids so I can send daily messages to users once they've interacted with the bot.

And thanks the the get started link! Just set that up quickly

Cretezy commented 7 years ago

Ah, possibly @davidchua didn't release to pip. I'm trying to get him to transfer the project as he's inactive. Try downloading the project manually or getting pip to pull from the GitHub repo.

wessilfie commented 7 years ago

yep, thankfully it wasn't too bad to just make my own method to get the result. Hopefully he can transfer the project so more people can work on it. It's a great wrapper!