Jump to content

Questions related to Facebook instant games lifecycle


pingu
 Share

Recommended Posts

Hello

Here is how I plan to implement my game:

1. game starts (from somewhere, either by search on Messenger or a friend inviting on Messenger, or a group share)

2. Player plays one round and dies

3. Player is shown a dialog to invite his friends (through FBInstant.chooseAsync())

4. Player chooses one of her friends and comes back to the game. Q: Does her friend immediately receive an invite?

5. Player makes a high score. I call "FBInstant.updateAsync()" with her high score and some text and image (RICH_GAMEPLAY update). Q: Who does this message go to? I can't choose any recipient when I send this, so who does it send it to?

Q: What is the difference between "shareAsync" and "updateAsync"?

Q: Does it matter where the player started playing the game from? Whether it was from a friend's invite or from a Facebook post share? Which steps above would it affect?

Thank you :)

 

Link to comment
Share on other sites

Hi,
4. Yes, it is sent immediately
5. It is sent to the current context (could be a 1:1 conversation or a group conversation)
6. It is well documented: https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2https://developers.facebook.com/docs/games/instant-games/rich-gameplay-features and https://developers.facebook.com/docs/games/instant-games/best-practices. I do not think I can put better words on it than the documentation itself.

7. Not really. But when you enter from a custom update for example, as it contains data (getEntryPointData), you can resume a game where it was and other things.

I hope that helped.

Link to comment
Share on other sites

Hi @Noel

Thanks for the reply. Let me write down my findings so it can help others.

shareAsync() is used to share an image / text to a new context (the user gets to choose).

updateAsync() will always share to the current context (without the user getting to choose). This means that if the game doesn't have a context (maybe because chooseAsync() was never called in the first place) it won't do anything.

 

Quote

4. Yes, it is sent immediately

This is not quite correct I think. chooseAsync() only sets the context. Only after calling updateAsync() will the actual messages get sent. :) Correct me if I'm wrong.

Another question I have is, how do I debug FBInstant code? For example, for me, updateAsync() is simply not sending any message even after I make thep player choose the context. How do I debug this?

I created the custom template, I put the correct object with base64 image, template reference, text, etc. but it just won't send the message :( 

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...