You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ Doing this gives you the ability to modify the texture before this happens, allo
115
115
116
116
My thanks to the following for helping with the Phaser 3 Examples, Docs and TypeScript definitions, either by reporting errors, fixing them or helping author the docs:
* @param {any} data - An object containing a set of key-value pairs that should be persisted to cloud storage as stats. Note that only numerical values are stored.
934
+
* @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage as stats. Note that only numerical values are stored.
935
935
*
936
936
* @return {this} This Facebook Instant Games Plugin instance.
937
937
*/
@@ -992,7 +992,7 @@ var FacebookInstantGamesPlugin = new Class({
* @param {any} data - An object containing a set of key-value pairs indicating how much to increment each stat in cloud storage. Note that only numerical values are processed.
995
+
* @param {object} data - An object containing a set of key-value pairs indicating how much to increment each stat in cloud storage. Note that only numerical values are processed.
996
996
*
997
997
* @return {this} This Facebook Instant Games Plugin instance.
998
998
*/
@@ -1027,6 +1027,20 @@ var FacebookInstantGamesPlugin = new Class({
1027
1027
returnthis;
1028
1028
},
1029
1029
1030
+
/**
1031
+
* Sets the data associated with the individual gameplay session for the current context.
1032
+
*
1033
+
* This function should be called whenever the game would like to update the current session data.
1034
+
*
1035
+
* This session data may be used to populate a variety of payloads, such as game play webhooks.
* @param {object} data - An arbitrary data object, which must be less than or equal to 1000 characters when stringified.
1041
+
*
1042
+
* @return {this} This Facebook Instant Games Plugin instance.
1043
+
*/
1030
1044
saveSession: function(data)
1031
1045
{
1032
1046
if(!this.checkAPI('setSessionData'))
@@ -1048,26 +1062,125 @@ var FacebookInstantGamesPlugin = new Class({
1048
1062
returnthis;
1049
1063
},
1050
1064
1065
+
/**
1066
+
* This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.
1067
+
*
1068
+
* A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.
1069
+
*
1070
+
* This data must be less than or equal to 1000 characters when stringified.
1071
+
*
1072
+
* When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.
1073
+
*
1074
+
* The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.
* @param {string} text - A text message to be shared.
1080
+
* @param {string} key - The key of the texture to use as the share image.
1081
+
* @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.
1082
+
* @param {object} [sessionData] - A blob of data to attach to the share.
1083
+
*
1084
+
* @return {this} This Facebook Instant Games Plugin instance.
* This invokes a dialog to let the user invite a friend to play this game, either as a message in Messenger or as a post on the user's timeline.
1093
+
*
1094
+
* A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.
1095
+
*
1096
+
* This data must be less than or equal to 1000 characters when stringified.
1097
+
*
1098
+
* When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.
1099
+
*
1100
+
* The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.
* @param {string} text - A text message to be shared.
1106
+
* @param {string} key - The key of the texture to use as the share image.
1107
+
* @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.
1108
+
* @param {object} [sessionData] - A blob of data to attach to the share.
1109
+
*
1110
+
* @return {this} This Facebook Instant Games Plugin instance.
* This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.
1119
+
*
1120
+
* A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.
1121
+
*
1122
+
* This data must be less than or equal to 1000 characters when stringified.
1123
+
*
1124
+
* When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.
1125
+
*
1126
+
* The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.
* @param {string} text - A text message to be shared.
1132
+
* @param {string} key - The key of the texture to use as the share image.
1133
+
* @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.
1134
+
* @param {object} [sessionData] - A blob of data to attach to the share.
1135
+
*
1136
+
* @return {this} This Facebook Instant Games Plugin instance.
* This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.
1145
+
*
1146
+
* A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.
1147
+
*
1148
+
* This data must be less than or equal to 1000 characters when stringified.
1149
+
*
1150
+
* When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.
1151
+
*
1152
+
* The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.
* @param {string} text - A text message to be shared.
1158
+
* @param {string} key - The key of the texture to use as the share image.
1159
+
* @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.
1160
+
* @param {object} [sessionData] - A blob of data to attach to the share.
1161
+
*
1162
+
* @return {this} This Facebook Instant Games Plugin instance.
* @param {string} intent - ("INVITE" | "REQUEST" | "CHALLENGE" | "SHARE") Indicates the intent of the share.
1177
+
* @param {string} text - A text message to be shared.
1178
+
* @param {string} key - The key of the texture to use as the share image.
1179
+
* @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.
1180
+
* @param {object} [sessionData] - A blob of data to attach to the share.
1181
+
*
1182
+
* @return {this} This Facebook Instant Games Plugin instance.
// intent ("INVITE" | "REQUEST" | "CHALLENGE" | "SHARE") Indicates the intent of the share.
1199
+
// image string A base64 encoded image to be shared.
1200
+
// text string A text message to be shared.
1201
+
// data Object? A blob of data to attach to the share. All game sessions launched from the share will be able to access this blob through FBInstant.getEntryPointData().
1202
+
1085
1203
varpayload={
1086
1204
intent: intent,
1087
1205
image: imageData,
1088
1206
text: text,
1089
1207
data: sessionData
1090
1208
};
1091
1209
1092
-
// console.log(payload);
1093
-
1094
-
// intent ("INVITE" | "REQUEST" | "CHALLENGE" | "SHARE") Indicates the intent of the share.
1095
-
// image string A base64 encoded image to be shared.
1096
-
// text string A text message to be shared.
1097
-
// data Object? A blob of data to attach to the share. All game sessions launched from the share will be able to access this blob through FBInstant.getEntryPointData().
1098
-
1099
1210
var_this=this;
1100
1211
1101
1212
FBInstant.shareAsync(payload).then(function()
@@ -1106,6 +1217,20 @@ var FacebookInstantGamesPlugin = new Class({
1106
1217
returnthis;
1107
1218
},
1108
1219
1220
+
/**
1221
+
* This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive.
1222
+
* If one of the bounds is null only the other bound will be checked against.
1223
+
* It will always return the original result for the first call made in a context in a given game play session.
1224
+
* Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.
0 commit comments