question

mariogarranz avatar image
mariogarranz asked

FB Messenger Bot - Querying a list of players based on date value?

I am implementing a Messenger Bot for a Facebook Instant game. The bot server needs to deliver certain messages to the players at given intervals since they last perform certain actions.

For this, I need to store the last time a player logged in, and perform scheculed calls to get the list of players that should be messaged at that specific time.

I cannot find a way to do this directly with PlayFab, and it feels too overkill to have a separate player database only for this feature.

Can someone please hint what would be the preferred way to do something like this with PlayFab? Thanks.

4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Citrus Yan avatar image Citrus Yan commented ·

Would you please elaborate your scenario so that we can provide a more detailed suggestion? Based on your description, you might use Player Segmentation to group desired players into a custom segment you define in real time and run Scheduled Tasks to message each player in that segment.

0 Likes 0 ·
mariogarranz avatar image mariogarranz Citrus Yan commented ·

Thanks Citrus. Indeed, I did some research and you are right.

I approached the problem from a classic perspective, so I have a server and need a list of players, then I query the database for them, but I see in this case it's PlayFab itself who notifies the server whenever a user enters a predefined Player Segment (in this case, by last login).

Now the issue is I'm quite lost as to what I have to do to have the automatic task sending a Facebook Message. I followed this video: https://www.youtube.com/watch?v=cxA2TAoNoWg but it assumes many things, as what the Azure server does (shows some code, not all) and how to implement the Cloud Script functions that send the message.

Is there any documentation on this? I can't seem to find any.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan mariogarranz commented ·

So, the main problem is that you want to know how to send Facebook messages from CloudScript, is that correct?

0 Likes 0 ·
Show more comments

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.