diff --git a/.gitignore b/.gitignore
index 414fc16ea..91d7fd2a2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -57,6 +57,10 @@ TestResult.xml
# Ignore Plugin Folders which are build by build
/UnitySDK/Assets/Plugins/
+# Ignore Unity Jar Resolver which is pulled in by build script
+/UnitySDK/Assets/PlayServicesResolver.meta
+/UnitySDK/Assets/PlayServicesResolver/
+
# Ignore Current Facebook Settings
FacebookSettings.asset*
@@ -79,3 +83,14 @@ StyleCop.Cache.meta
# Nuget packages
/packages/
+
+# AN SDK builds
+ads/Assets/AudienceNetwork/Plugins/Android/libs/ads-release.aar
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/FBAudienceNetwork
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/Headers/*.h
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/Info.plist
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/Modules/module.modulemap
+ads/Assets/AudienceNetwork/Editor/iOS.meta
+ads/Assets/AudienceNetwork/Plugins/Android/libs/ads-release.aar.meta
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/*.h.meta
+ads/Assets/AudienceNetwork/Plugins/iOS/libs/FBAudienceNetwork.framework/Headers/*.h.meta
diff --git a/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj
index b22eb2103..33ef312a6 100644
--- a/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj
+++ b/Facebook.Unity.Android.StrippingHack/Facebook.Unity.Android.StrippingHack.csproj
@@ -8,7 +8,8 @@
Facebook.Unity.Android.StrippingHack
Facebook.Unity.Android
v3.5
-
+
+
true
diff --git a/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs b/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs
index 0c6492d4b..a309da368 100644
--- a/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Android.StrippingHack/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Android/Properties/AssemblyInfo.cs b/Facebook.Unity.Android/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.Android/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Android/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Arcade/Plugins/FacebookNamedPipeClient.dll b/Facebook.Unity.Arcade/Plugins/FacebookNamedPipeClient.dll
deleted file mode 100644
index e8d118f3d..000000000
Binary files a/Facebook.Unity.Arcade/Plugins/FacebookNamedPipeClient.dll and /dev/null differ
diff --git a/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj b/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj
index 735b4faad..6f469b213 100644
--- a/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj
+++ b/Facebook.Unity.Editor/Facebook.Unity.Editor.csproj
@@ -41,6 +41,9 @@
+
+ ..\UnitySDK\Assets\PlayServicesResolver\Editor\Google.VersionHandler.dll
+
@@ -54,6 +57,7 @@
+
diff --git a/Facebook.Unity.Editor/FacebookBuild.cs b/Facebook.Unity.Editor/FacebookBuild.cs
index 79232b8ad..b83e25597 100644
--- a/Facebook.Unity.Editor/FacebookBuild.cs
+++ b/Facebook.Unity.Editor/FacebookBuild.cs
@@ -31,6 +31,7 @@ internal class FacebookBuild
private const string SDKPath = "Assets/FacebookSDK/SDK/";
private const string ExamplesPath = "Assets/FacebookSDK/Examples/";
private const string PluginsPath = "Assets/FacebookSDK/Plugins/";
+ private const string PlayServicesResolverPath = "Assets/PlayServicesResolver/";
public enum Target
{
@@ -82,11 +83,16 @@ public static string ExportPackage()
string[] sdkFiles = (string[])Directory.GetFiles(SDKPath, "*.*", SearchOption.AllDirectories);
string[] exampleFiles = (string[])Directory.GetFiles(ExamplesPath, "*.*", SearchOption.AllDirectories);
string[] pluginsFiles = (string[])Directory.GetFiles(PluginsPath, "*.*", SearchOption.AllDirectories);
- string[] files = new string[facebookFiles.Length + sdkFiles.Length + exampleFiles.Length + pluginsFiles.Length];
+
+ string[] playServicesResolverFiles = (string[])Directory.GetFiles(PlayServicesResolverPath, "*.*",
+ SearchOption.AllDirectories);
+ string[] files = new string[facebookFiles.Length + sdkFiles.Length + exampleFiles.Length +
+ pluginsFiles.Length + playServicesResolverFiles.Length];
facebookFiles.CopyTo(files, 0);
sdkFiles.CopyTo(files, facebookFiles.Length);
exampleFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length);
pluginsFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length);
+ playServicesResolverFiles.CopyTo(files, sdkFiles.Length + facebookFiles.Length + exampleFiles.Length + pluginsFiles.Length);
AssetDatabase.ExportPackage(
files,
diff --git a/Facebook.Unity.Editor/FacebookPostprocess.cs b/Facebook.Unity.Editor/FacebookPostprocess.cs
index a51330629..265c4d289 100644
--- a/Facebook.Unity.Editor/FacebookPostprocess.cs
+++ b/Facebook.Unity.Editor/FacebookPostprocess.cs
@@ -50,9 +50,10 @@ public static void OnPostProcessBuild(BuildTarget target, string path)
if (target == BuildTarget.Android)
{
// The default Bundle Identifier for Unity does magical things that causes bad stuff to happen
- if (PlayerSettings.bundleIdentifier == "com.Company.ProductName")
- {
- Debug.LogError("The default Unity Bundle Identifier (com.Company.ProductName) will not work correctly.");
+ var defaultIdentifier = "com.Company.ProductName";
+
+ if (Utility.GetApplicationIdentifier() == defaultIdentifier) {
+ Debug.LogError ("The default Unity Bundle Identifier (com.Company.ProductName) will not work correctly.");
}
if (!FacebookAndroidUtil.SetupProperly)
diff --git a/Facebook.Unity.Editor/FacebookSettingsEditor.cs b/Facebook.Unity.Editor/FacebookSettingsEditor.cs
index a8f029221..95e3f01e9 100644
--- a/Facebook.Unity.Editor/FacebookSettingsEditor.cs
+++ b/Facebook.Unity.Editor/FacebookSettingsEditor.cs
@@ -35,7 +35,6 @@ public class FacebookSettingsEditor : Editor
private bool showAndroidUtils = false;
private bool showIOSSettings = false;
private bool showAppLinksSettings = false;
- private bool showFacebookUploadBuildSettings = false;
private bool showAboutSection = false;
private GUIContent appNameLabel = new GUIContent(
@@ -62,10 +61,6 @@ public class FacebookSettingsEditor : Editor
private GUIContent classNameLabel = new GUIContent("Class Name [?]", "aka: the activity name");
private GUIContent debugAndroidKeyLabel = new GUIContent("Debug Android Key Hash [?]", "Copy this key to the Facebook Settings in order to test a Facebook Android app");
- private GUIContent uploadAccessTokenLabel = new GUIContent(
- "Upload Access Token [?]",
- "Use this to upload build for Facebook platform");
-
private GUIContent sdkVersion = new GUIContent("SDK Version [?]", "This Unity Facebook SDK version. If you have problems or compliments please include this so we know exactly what version to look out for.");
public FacebookSettingsEditor()
@@ -304,7 +299,7 @@ private void AndroidUtilGUI()
EditorGUILayout.LabelField(
"Copy and Paste these into your \"Native Android App\" Settings on developers.facebook.com/apps");
- this.SelectableLabelField(this.packageNameLabel, PlayerSettings.bundleIdentifier);
+ this.SelectableLabelField(this.packageNameLabel, Utility.GetApplicationIdentifier());
this.SelectableLabelField(this.classNameLabel, ManifestMod.DeepLinkingActivityName);
this.SelectableLabelField(this.debugAndroidKeyLabel, FacebookAndroidUtil.DebugKeyHash);
if (GUILayout.Button("Regenerate Android Manifest"))
@@ -361,23 +356,6 @@ private void AppLinksUtilGUI()
}
}
- private void UploadBuildSettingsGUI()
- {
- this.showFacebookUploadBuildSettings = EditorGUILayout.Foldout(
- this.showFacebookUploadBuildSettings,
- "Upload Facebook Build Settings");
-
- if (this.showFacebookUploadBuildSettings)
- {
- EditorGUILayout.BeginHorizontal();
- EditorGUILayout.LabelField(this.uploadAccessTokenLabel, GUILayout.Width(135), GUILayout.Height(16));
- FacebookSettings.UploadAccessToken = EditorGUILayout.TextField(FacebookSettings.UploadAccessToken);
- EditorGUILayout.EndHorizontal();
- }
-
- EditorGUILayout.Space();
- }
-
private void AboutGUI()
{
this.showAboutSection = EditorGUILayout.Foldout(this.showAboutSection, "About the Facebook SDK");
diff --git a/Facebook.Unity.Editor/Properties/AssemblyInfo.cs b/Facebook.Unity.Editor/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.Editor/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Editor/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Editor/Utility.cs b/Facebook.Unity.Editor/Utility.cs
index ac770900e..41ec57616 100644
--- a/Facebook.Unity.Editor/Utility.cs
+++ b/Facebook.Unity.Editor/Utility.cs
@@ -23,9 +23,14 @@ namespace Facebook.Unity.Editor
using System;
using System.Collections.Generic;
using System.Linq;
+ using System.Reflection;
+ using UnityEditor;
public static class Utility
{
+ private static string BundleIdentifier = "bundleIdentifier";
+ private static string ApplicationIdentifier = "applicationIdentifier";
+
public static T Pop(this IList list)
{
if (!list.Any())
@@ -54,5 +59,20 @@ public static bool TryGetValue(
value = default(T);
return false;
}
+
+ public static string GetApplicationIdentifier()
+ {
+ Type playerSettingType = typeof(PlayerSettings);
+ PropertyInfo info = playerSettingType.GetProperty(ApplicationIdentifier)
+ ?? playerSettingType.GetProperty(BundleIdentifier);
+ if (info != null) {
+ string applicationIdentifier = (string)info.GetValue(playerSettingType, null);
+ if (applicationIdentifier is string) {
+ return applicationIdentifier;
+ }
+ }
+
+ return null;
+ }
}
}
diff --git a/Facebook.Unity.Editor/android/AndroidSupportLibraryResolver.cs b/Facebook.Unity.Editor/android/AndroidSupportLibraryResolver.cs
new file mode 100644
index 000000000..97b3cc8e4
--- /dev/null
+++ b/Facebook.Unity.Editor/android/AndroidSupportLibraryResolver.cs
@@ -0,0 +1,126 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+namespace Facebook.Unity.Editor
+{
+ using System;
+ using System.Collections.Generic;
+ using UnityEditor;
+ using UnityEngine;
+
+ [InitializeOnLoad]
+ public class AndroidSupportLibraryResolver
+ {
+ static AndroidSupportLibraryResolver()
+ {
+ AndroidSupportLibraryResolver.setupDependencies();
+ }
+
+ private static void setupDependencies()
+ {
+ // Setup the resolver using reflection as the module may not be
+ // available at compile time.
+ Type playServicesSupport = Google.VersionHandler.FindClass(
+ "Google.JarResolver",
+ "Google.JarResolver.PlayServicesSupport");
+
+ if (playServicesSupport == null) {
+ return;
+ }
+
+ object svcSupport = Google.VersionHandler.InvokeStaticMethod(
+ playServicesSupport,
+ "CreateInstance",
+ new object[] {
+ "FacebookUnitySDK",
+ EditorPrefs.GetString("AndroidSdkRoot"),
+ "ProjectSettings"
+ });
+
+ // com.android.support:support-v4
+ Google.VersionHandler.InvokeInstanceMethod(
+ svcSupport,
+ "DependOn",
+ new object[] {
+ "com.android.support",
+ "support-v4",
+ "25.3.1"
+ },
+ namedArgs: new Dictionary() {
+ {
+ "packageIds",
+ new string[] {
+ "extra-android-m2repository"
+ }
+ }
+ });
+
+ AndroidSupportLibraryResolver.addSupportLibraryDepenency(svcSupport, "support-v4", "25.3.1");
+ AndroidSupportLibraryResolver.addSupportLibraryDepenency(svcSupport, "appcompat-v7", "25.3.1");
+ AndroidSupportLibraryResolver.addSupportLibraryDepenency(svcSupport, "cardview-v7", "25.3.1");
+ AndroidSupportLibraryResolver.addSupportLibraryDepenency(svcSupport, "customtabs", "25.3.1");
+
+ }
+
+ public static void addSupportLibraryDepenency(
+ object svcSupport,
+ String packageName,
+ String version)
+ {
+ Debug.LogWarning("App - " + packageName + ":" + version);
+ Google.VersionHandler.InvokeInstanceMethod(
+ svcSupport,
+ "DependOn",
+ new object[] {
+ "com.android.support",
+ packageName,
+ version
+ },
+ namedArgs: new Dictionary() {
+ {
+ "packageIds",
+ new string[] {
+ "extra-android-m2repository"
+ }
+ }
+ });
+ }
+ }
+}
diff --git a/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj b/Facebook.Unity.Gameroom/Facebook.Unity.Gameroom.csproj
similarity index 93%
rename from Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj
rename to Facebook.Unity.Gameroom/Facebook.Unity.Gameroom.csproj
index 907b1ce3c..c36c66f2f 100644
--- a/Facebook.Unity.Arcade/Facebook.Unity.Arcade.csproj
+++ b/Facebook.Unity.Gameroom/Facebook.Unity.Gameroom.csproj
@@ -5,8 +5,8 @@
AnyCPU
{D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}
Library
- Facebook.Unity.Arcade
- Facebook.Unity.Arcade
+ Facebook.Unity.Gameroom
+ Facebook.Unity.Gameroom
v3.5
@@ -40,8 +40,8 @@
-
+
diff --git a/Facebook.Unity.Arcade/ArcadeWrapper.cs b/Facebook.Unity.Gameroom/GameroomWrapper.cs
similarity index 60%
rename from Facebook.Unity.Arcade/ArcadeWrapper.cs
rename to Facebook.Unity.Gameroom/GameroomWrapper.cs
index 1c7d13b80..03dd7f62f 100644
--- a/Facebook.Unity.Arcade/ArcadeWrapper.cs
+++ b/Facebook.Unity.Gameroom/GameroomWrapper.cs
@@ -18,32 +18,32 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
using System;
using System.Collections.Generic;
using FacebookGames;
using FacebookPlatformServiceClient;
- internal class ArcadeWrapper : IArcadeWrapper
+ internal class GameroomWrapper : IGameroomWrapper
{
private const string PipeErrorMessage = @"Pipe name not passed to application on start.
Make sure you are running inside the facebook games client.";
private FacebookNamedPipeClient clientPipe;
- private ArcadeFacebookGameObject facebookGameObject;
+ private GameroomFacebookGameObject facebookGameObject;
- public ArcadeWrapper()
+ public GameroomWrapper()
{
string pipeName;
Utilities.CommandLineArguments.TryGetValue("/pn", out pipeName);
if (pipeName == null)
{
- throw new InvalidOperationException(ArcadeWrapper.PipeErrorMessage);
+ throw new InvalidOperationException(GameroomWrapper.PipeErrorMessage);
}
this.clientPipe = new FacebookNamedPipeClient(pipeName);
- this.facebookGameObject = ComponentFactory.GetComponent();
+ this.facebookGameObject = ComponentFactory.GetComponent();
}
public IDictionary PipeResponse
@@ -71,15 +71,30 @@ public IDictionary PipeResponse
}
}
+ public void Init(GameroomFacebook.OnComplete completeDelegate)
+ {
+ string accessTokenInfo;
+ Utilities.CommandLineArguments.TryGetValue("/access_token", out accessTokenInfo);
+ if (accessTokenInfo != null)
+ {
+ accessTokenInfo = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(accessTokenInfo));
+ completeDelegate(new ResultContainer(accessTokenInfo));
+ }
+ else
+ {
+ completeDelegate(new ResultContainer(string.Empty));
+ }
+ }
+
public void DoLoginRequest(
string appID,
string permissions,
string callbackId,
- ArcadeFacebook.OnComplete completeDelegate)
+ GameroomFacebook.OnComplete completeDelegate)
{
var request = new LoginRequest(
- appID,
- permissions);
+ appID,
+ permissions);
this.HandleRequest(
request,
callbackId,
@@ -100,21 +115,21 @@ public void DoPayRequest(
string testCurrency,
string developerPayload,
string callbackId,
- ArcadeFacebook.OnComplete completeDelegate)
+ GameroomFacebook.OnComplete completeDelegate)
{
var request = new PayRequest(
- appId,
- method,
- action,
- product,
- productId,
- quantity,
- quantityMin,
- quantityMax,
- requestId,
- pricepointId,
- testCurrency,
- developerPayload);
+ appId,
+ method,
+ action,
+ product,
+ productId,
+ quantity,
+ quantityMin,
+ quantityMax,
+ requestId,
+ pricepointId,
+ testCurrency,
+ developerPayload);
this.HandleRequest(
request,
callbackId,
@@ -131,17 +146,17 @@ public void DoFeedShareRequest(
string pictureLink,
string mediaSource,
string callbackId,
- ArcadeFacebook.OnComplete completeDelegate)
+ GameroomFacebook.OnComplete completeDelegate)
{
var request = new FeedShareRequest(
- appId,
- toId,
- link,
- linkName,
- linkCaption,
- linkDescription,
- pictureLink,
- mediaSource);
+ appId,
+ toId,
+ link,
+ linkName,
+ linkCaption,
+ linkDescription,
+ pictureLink,
+ mediaSource);
this.HandleRequest(
request,
callbackId,
@@ -160,25 +175,49 @@ public void DoAppRequestRequest(
string data,
string title,
string callbackId,
- ArcadeFacebook.OnComplete completeDelegate)
+ GameroomFacebook.OnComplete completeDelegate)
{
var request = new AppRequestRequest(
- appId,
- message,
- actionType,
- objectId,
- to,
- filters,
- excludeIDs,
- maxRecipients,
- data,
- title);
+ appId,
+ message,
+ actionType,
+ objectId,
+ to,
+ filters,
+ excludeIDs,
+ maxRecipients,
+ data,
+ title);
this.HandleRequest(
request,
callbackId,
completeDelegate);
}
+ public void DoPayPremiumRequest(
+ string appId,
+ string callbackId,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ var request = new PayPremiumRequest(appId);
+ this.HandleRequest(
+ request,
+ callbackId,
+ completeDelegate);
+ }
+
+ public void DoHasLicenseRequest(
+ string appId,
+ string callbackId,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ var request = new HasLicenseRequest(appId);
+ this.HandleRequest(
+ request,
+ callbackId,
+ completeDelegate);
+ }
+
public void SendRequest(T request)
where T : PipePacketResponse
{
@@ -189,7 +228,7 @@ public void SendRequest(T request)
private void HandleRequest(
T request,
string callbackId,
- ArcadeFacebook.OnComplete completeDelegate)
+ GameroomFacebook.OnComplete completeDelegate)
where T : PipePacketRequest
where R : PipePacketResponse
{
diff --git a/Facebook.Unity.Gameroom/Plugins/FacebookNamedPipeClient.dll b/Facebook.Unity.Gameroom/Plugins/FacebookNamedPipeClient.dll
new file mode 100644
index 000000000..df64d7ff9
Binary files /dev/null and b/Facebook.Unity.Gameroom/Plugins/FacebookNamedPipeClient.dll differ
diff --git a/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs b/Facebook.Unity.Gameroom/Properties/AssemblyInfo.cs
similarity index 96%
rename from Facebook.Unity.Arcade/Properties/AssemblyInfo.cs
rename to Facebook.Unity.Gameroom/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.Arcade/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Gameroom/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Arcade/Settings.StyleCop b/Facebook.Unity.Gameroom/Settings.StyleCop
similarity index 100%
rename from Facebook.Unity.Arcade/Settings.StyleCop
rename to Facebook.Unity.Gameroom/Settings.StyleCop
diff --git a/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj
index f838f8cd7..07c194e5b 100644
--- a/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj
+++ b/Facebook.Unity.IOS.StrippingHack/Facebook.Unity.IOS.StrippingHack.csproj
@@ -8,7 +8,8 @@
Facebook.Unity.IOS.StrippingHack
Facebook.Unity.IOS
v3.5
-
+
+
true
diff --git a/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs b/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs
index 0c6492d4b..a309da368 100644
--- a/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.IOS.StrippingHack/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.IOS/IOSWrapper.cs b/Facebook.Unity.IOS/IOSWrapper.cs
index 96d05c529..fa907cbec 100644
--- a/Facebook.Unity.IOS/IOSWrapper.cs
+++ b/Facebook.Unity.IOS/IOSWrapper.cs
@@ -144,24 +144,6 @@ public void AppInvite(
previewImageUrl);
}
- public void CreateGameGroup(
- int requestId,
- string name,
- string description,
- string privacy)
- {
- IOSWrapper.IOSFBCreateGameGroup(
- requestId,
- name,
- description,
- privacy);
- }
-
- public void JoinGameGroup(int requestId, string groupId)
- {
- IOSWrapper.IOSFBJoinGameGroup(requestId, groupId);
- }
-
public void FBSettingsActivateApp(string appId)
{
IOSWrapper.IOSFBSettingsActivateApp(appId);
@@ -286,16 +268,6 @@ private static extern void IOSFBAppInvite(
string appLinkUrl,
string previewImageUrl);
- [DllImport("__Internal")]
- private static extern void IOSFBCreateGameGroup(
- int requestId,
- string name,
- string description,
- string privacy);
-
- [DllImport("__Internal")]
- private static extern void IOSFBJoinGameGroup(int requestId, string groupId);
-
[DllImport("__Internal")]
private static extern void IOSFBSettingsActivateApp(string appId);
diff --git a/Facebook.Unity.IOS/Properties/AssemblyInfo.cs b/Facebook.Unity.IOS/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.IOS/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.IOS/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Settings/FacebookSettings.cs b/Facebook.Unity.Settings/FacebookSettings.cs
index 175829804..14a922d68 100644
--- a/Facebook.Unity.Settings/FacebookSettings.cs
+++ b/Facebook.Unity.Settings/FacebookSettings.cs
@@ -60,8 +60,6 @@ public class FacebookSettings : ScriptableObject
private string iosURLSuffix = string.Empty;
[SerializeField]
private List appLinkSchemes = new List() { new UrlSchemes() };
- [SerializeField]
- private string uploadAccessToken = string.Empty;
public delegate void OnChangeCallback();
@@ -343,27 +341,6 @@ public static List AppLinkSchemes
}
}
- ///
- /// Gets or sets the upload access token.
- ///
- /// The access token to upload build to Facebook hosting.
- public static string UploadAccessToken
- {
- get
- {
- return Instance.uploadAccessToken;
- }
-
- set
- {
- if (Instance.uploadAccessToken != value)
- {
- Instance.uploadAccessToken = value;
- SettingsChanged();
- }
- }
- }
-
public static FacebookSettings Instance
{
get
diff --git a/Facebook.Unity.Settings/Properties/AssemblyInfo.cs b/Facebook.Unity.Settings/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.Settings/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Settings/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Tests/AppGroup.cs b/Facebook.Unity.Tests/AppGroup.cs
deleted file mode 100644
index c15f0594a..000000000
--- a/Facebook.Unity.Tests/AppGroup.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
- *
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
- * copy, modify, and distribute this software in source code or binary form for use
- * in connection with the web services and APIs provided by Facebook.
- *
- * As with any software that integrates with the Facebook platform, your use of
- * this software is subject to the Facebook Developer Principles and Policies
- * [http://developers.facebook.com/policy/]. This copyright notice shall be
- * included in all copies or substantial portions of the software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-namespace Facebook.Unity.Tests
-{
- using NUnit.Framework;
-
- public abstract class AppGroup : FacebookTestClass
- {
- [Test]
- public void TestGameGroupCreate()
- {
- IGroupCreateResult result = null;
- FB.GameGroupCreate("Name", "Description", "CLOSED", (r) => (result = r));
- Assert.IsNotNull(result);
- Assert.AreEqual(result.GroupId, MockResults.MockGroupIDValue);
- }
-
- [Test]
- public void TestGameGroupJoin()
- {
- IGroupJoinResult result = null;
- FB.GameGroupJoin("1234567890", (r) => (result = r));
- Assert.IsNotNull(result);
- }
- }
-}
diff --git a/Facebook.Unity.Tests/AppLinks.cs b/Facebook.Unity.Tests/AppLinks.cs
index be2c8397b..c19cc834f 100644
--- a/Facebook.Unity.Tests/AppLinks.cs
+++ b/Facebook.Unity.Tests/AppLinks.cs
@@ -28,7 +28,11 @@ public abstract class AppLinks : FacebookTestClass
public void TestGetAppLink()
{
IAppLinkResult result = null;
- FB.GetAppLink((r) => (result = r));
+ FB.GetAppLink(
+ delegate(IAppLinkResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
}
}
diff --git a/Facebook.Unity.Tests/AppRequest.cs b/Facebook.Unity.Tests/AppRequest.cs
index 09895a7a8..083152a50 100644
--- a/Facebook.Unity.Tests/AppRequest.cs
+++ b/Facebook.Unity.Tests/AppRequest.cs
@@ -40,7 +40,13 @@ public void TestAppRequest()
{ AppRequestResult.ToKey, string.Join(",", toList) },
};
- FB.AppRequest("Test message", callback: (r) => (result = r));
+ FB.AppRequest(
+ "Test message",
+ callback:
+ delegate(IAppRequestResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(result.RequestID, mockRequestId);
Assert.IsTrue(new HashSet(toList).SetEquals(result.To));
diff --git a/Facebook.Unity.Tests/Canvas/MockCanvas.cs b/Facebook.Unity.Tests/Canvas/MockCanvas.cs
index 18b7f8c9e..76fefcf29 100644
--- a/Facebook.Unity.Tests/Canvas/MockCanvas.cs
+++ b/Facebook.Unity.Tests/Canvas/MockCanvas.cs
@@ -70,17 +70,7 @@ public void ExternalCall(string functionName, object[] args)
var callbackMetod = (string)args[2];
var callbackID = int.Parse((string)args[1]);
- if (callbackMetod == Constants.OnGroupCreateCompleteMethodName)
- {
- result = MockResults.GetGroupCreateResult(callbackID, this.ResultExtras);
- callback = this.Facebook.OnGroupCreateComplete;
- }
- else if (callbackMetod == Constants.OnGroupJoinCompleteMethodName)
- {
- result = MockResults.GetGenericResult(callbackID, this.ResultExtras);
- callback = this.Facebook.OnGroupJoinComplete;
- }
- else if (callbackMetod == Constants.OnAppRequestsCompleteMethodName)
+ if (callbackMetod == Constants.OnAppRequestsCompleteMethodName)
{
result = MockResults.GetGenericResult(callbackID, this.ResultExtras);
callback = this.Facebook.OnAppRequestsComplete;
diff --git a/Facebook.Unity.Tests/Canvas/Pay.cs b/Facebook.Unity.Tests/Canvas/Pay.cs
index 1d7bf6bf5..faa5318d7 100644
--- a/Facebook.Unity.Tests/Canvas/Pay.cs
+++ b/Facebook.Unity.Tests/Canvas/Pay.cs
@@ -31,7 +31,12 @@ public class Pay : FacebookTestClass
public void SimplePayTest()
{
IPayResult result = null;
- FB.Canvas.Pay("testProduct", callback: (r) => (result = r));
+ FB.Canvas.Pay(
+ "testProduct",
+ callback: delegate(IPayResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
}
@@ -46,7 +51,12 @@ public void CancelPayTest()
};
this.Mock.ResultExtras = extras;
- FB.Canvas.Pay("testProduct", callback: (r) => (result = r));
+ FB.Canvas.Pay(
+ "testProduct",
+ callback: delegate(IPayResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.IsTrue(result.Cancelled);
}
@@ -63,7 +73,12 @@ public void ErrorPayTest()
};
this.Mock.ResultExtras = extras;
- FB.Canvas.Pay("testProduct", callback: (r) => (result = r));
+ FB.Canvas.Pay(
+ "testProduct",
+ callback: delegate(IPayResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(result.ErrorCode, extras[PayResult.ErrorCodeKey]);
Assert.AreEqual(result.Error, extras[PayResult.ErrorMessageKey]);
diff --git a/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj b/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj
index 4b0ff574f..8621b3f92 100644
--- a/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj
+++ b/Facebook.Unity.Tests/Facebook.Unity.Tests.csproj
@@ -37,27 +37,28 @@
-
+
+
+
-
+
-
@@ -73,7 +74,6 @@
-
@@ -87,12 +87,12 @@
+
-
@@ -111,10 +111,12 @@
\Applications\Unity\Unity.app\Contents\Managed\UnityEngine.dll
-
- ..\packages\NSubstitute.1.10.0.0\lib\net40\NSubstitute.dll
+ ..\packages\NSubstitute.2.0.3\lib\net40\NSubstitute.dll
+
+
+ ..\packages\NUnit.3.6.1\lib\net40\nunit.framework.dll
@@ -127,7 +129,7 @@
-
+
diff --git a/Facebook.Unity.Tests/FacebookTestClass.cs b/Facebook.Unity.Tests/FacebookTestClass.cs
index f8c3fcbd4..974c43d45 100644
--- a/Facebook.Unity.Tests/FacebookTestClass.cs
+++ b/Facebook.Unity.Tests/FacebookTestClass.cs
@@ -23,10 +23,12 @@ namespace Facebook.Unity.Tests
using System;
using Facebook.Unity.Canvas;
using Facebook.Unity.Editor;
+ using Facebook.Unity.Gameroom;
using Facebook.Unity.Mobile.Android;
using Facebook.Unity.Mobile.IOS;
using Facebook.Unity.Tests.Canvas;
using Facebook.Unity.Tests.Editor;
+ using Facebook.Unity.Tests.Gameroom;
using Facebook.Unity.Tests.Mobile.Android;
using Facebook.Unity.Tests.Mobile.IOS;
using NSubstitute;
@@ -60,6 +62,15 @@ public void Init()
this.Mock.Facebook = facebook;
FB.FacebookImpl = facebook;
}
+ else if (Attribute.GetCustomAttribute(type, typeof(GameroomTestAttribute)) != null)
+ {
+ var mockWrapper = new MockGameroom();
+ Constants.CurrentPlatform = FacebookUnityPlatform.Gameroom;
+ var facebook = new GameroomFacebook(mockWrapper, callbackManager);
+ this.Mock = mockWrapper;
+ this.Mock.Facebook = facebook;
+ FB.FacebookImpl = facebook;
+ }
else if (Attribute.GetCustomAttribute(type, typeof(CanvasTestAttribute)) != null)
{
var mockWrapper = new MockCanvas();
diff --git a/Facebook.Unity.Tests/FeedShare.cs b/Facebook.Unity.Tests/FeedShare.cs
index 48aa4eae1..1862ce9b9 100644
--- a/Facebook.Unity.Tests/FeedShare.cs
+++ b/Facebook.Unity.Tests/FeedShare.cs
@@ -29,7 +29,12 @@ public abstract class FeedShare : FacebookTestClass
public void SimpleFeedShare()
{
IShareResult result = null;
- FB.FeedShare(link: new Uri("https://www.facebook.com"), callback: (r) => (result = r));
+ FB.FeedShare(
+ link: new Uri("https://www.facebook.com"),
+ callback: delegate(IShareResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
}
}
diff --git a/Facebook.Unity.Tests/Editor/AppGroup.cs b/Facebook.Unity.Tests/Gameroom/AppRequest.cs
similarity index 90%
rename from Facebook.Unity.Tests/Editor/AppGroup.cs
rename to Facebook.Unity.Tests/Gameroom/AppRequest.cs
index 6c6c6a86c..5944b61c1 100644
--- a/Facebook.Unity.Tests/Editor/AppGroup.cs
+++ b/Facebook.Unity.Tests/Gameroom/AppRequest.cs
@@ -18,13 +18,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Tests.Editor
+namespace Facebook.Unity.Tests.Gameroom
{
using NUnit.Framework;
- [EditorTest]
+ [GameroomTest]
[TestFixture]
- public class AppGroup : Facebook.Unity.Tests.AppGroup
+ public class AppRequest : Facebook.Unity.Tests.AppRequest
{
}
}
diff --git a/Facebook.Unity.Tests/Mobile/Android/AppGroup.cs b/Facebook.Unity.Tests/Gameroom/GameroomTestAttribute.cs
similarity index 86%
rename from Facebook.Unity.Tests/Mobile/Android/AppGroup.cs
rename to Facebook.Unity.Tests/Gameroom/GameroomTestAttribute.cs
index ba9ca2beb..9b83ae68e 100644
--- a/Facebook.Unity.Tests/Mobile/Android/AppGroup.cs
+++ b/Facebook.Unity.Tests/Gameroom/GameroomTestAttribute.cs
@@ -18,13 +18,14 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Tests.Mobile.Android
+namespace Facebook.Unity.Tests.Gameroom
{
- using NUnit.Framework;
+ using System;
- [AndroidTest]
- [TestFixture]
- public class AppGroup : Facebook.Unity.Tests.AppGroup
+ internal class GameroomTestAttribute : Attribute
{
+ public GameroomTestAttribute()
+ {
+ }
}
}
diff --git a/Facebook.Unity.Tests/Gameroom/Init.cs b/Facebook.Unity.Tests/Gameroom/Init.cs
new file mode 100644
index 000000000..58ae24444
--- /dev/null
+++ b/Facebook.Unity.Tests/Gameroom/Init.cs
@@ -0,0 +1,38 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+namespace Facebook.Unity.Tests.Gameroom
+{
+ using Facebook.Unity.Gameroom;
+ using NUnit.Framework;
+
+ [GameroomTest]
+ [TestFixture]
+ public class Init : Facebook.Unity.Tests.Init
+ {
+ protected override void CallInit(InitDelegate callback)
+ {
+ ((GameroomFacebook)this.Mock.Facebook).Init(
+ "123456789",
+ null,
+ callback);
+ }
+ }
+}
diff --git a/Facebook.Unity.Tests/Canvas/AppGroup.cs b/Facebook.Unity.Tests/Gameroom/Login.cs
similarity index 91%
rename from Facebook.Unity.Tests/Canvas/AppGroup.cs
rename to Facebook.Unity.Tests/Gameroom/Login.cs
index 42905e28a..855ee57bb 100644
--- a/Facebook.Unity.Tests/Canvas/AppGroup.cs
+++ b/Facebook.Unity.Tests/Gameroom/Login.cs
@@ -18,13 +18,13 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Tests.Canvas
+namespace Facebook.Unity.Tests.Gameroom
{
using NUnit.Framework;
- [CanvasTest]
+ [GameroomTest]
[TestFixture]
- public class AppGroup : Facebook.Unity.Tests.AppGroup
+ public class Login : Facebook.Unity.Tests.Login
{
}
}
diff --git a/Facebook.Unity.Tests/Gameroom/MockGameroom.cs b/Facebook.Unity.Tests/Gameroom/MockGameroom.cs
new file mode 100644
index 000000000..2e0e86273
--- /dev/null
+++ b/Facebook.Unity.Tests/Gameroom/MockGameroom.cs
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+namespace Facebook.Unity.Tests.Gameroom
+{
+ using System;
+ using System.Collections.Generic;
+ using Facebook.Unity.Gameroom;
+ using NUnit.Framework;
+
+ internal class MockGameroom : MockWrapper, IGameroomWrapper
+ {
+ private Dictionary response = new Dictionary();
+
+ public IDictionary PipeResponse
+ {
+ get
+ {
+ return this.response;
+ }
+
+ set
+ {
+ if (value == null)
+ {
+ return;
+ }
+
+ throw new NotSupportedException("Can only set pipe response to null");
+ }
+ }
+
+ public void Init(GameroomFacebook.OnComplete completeDelegate)
+ {
+ // Handle testing of init returning access token. It would be nice
+ // to not have init return the access token but this could be
+ // a breaking change for people who read the raw result
+ ResultContainer resultContainer;
+ IDictionary resultExtras = this.ResultExtras;
+ if (resultExtras != null)
+ {
+ var result = MockResults.GetGenericResult(0, resultExtras);
+ resultContainer = new ResultContainer(result);
+ }
+ else
+ {
+ resultContainer = new ResultContainer(string.Empty);
+ }
+
+ completeDelegate(resultContainer);
+ }
+
+ public void DoLoginRequest(
+ string appID,
+ string permissions,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ var result = MockResults.GetLoginResult(int.Parse(callbackID), permissions, this.ResultExtras);
+ completeDelegate(new ResultContainer(result));
+ }
+
+ public void DoPayRequest(
+ string appId,
+ string method,
+ string action,
+ string product,
+ string productId,
+ string quantity,
+ string quantityMin,
+ string quantityMax,
+ string requestId,
+ string pricepointId,
+ string testCurrency,
+ string developerPayload,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ // Stub
+ }
+
+ public void DoFeedShareRequest(
+ string appId,
+ string toId,
+ string link,
+ string linkName,
+ string linkCaption,
+ string linkDescription,
+ string pictureLink,
+ string mediaSource,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ // Stub
+ }
+
+ public void DoAppRequestRequest(
+ string appId,
+ string message,
+ string actionType,
+ string objectId,
+ string to,
+ string filters,
+ string excludeIDs,
+ string maxRecipients,
+ string data,
+ string title,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ int cbid = Convert.ToInt32(callbackID);
+ completeDelegate(new ResultContainer(MockResults.GetGenericResult(cbid, this.ResultExtras)));
+ }
+
+ public void DoPayPremiumRequest(
+ string appId,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ // Stub
+ }
+
+ public void DoHasLicenseRequest(
+ string appId,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate)
+ {
+ // Stub
+ }
+ }
+}
diff --git a/Facebook.Unity.Tests/Init.cs b/Facebook.Unity.Tests/Init.cs
index 63983dbf5..e8e88d896 100644
--- a/Facebook.Unity.Tests/Init.cs
+++ b/Facebook.Unity.Tests/Init.cs
@@ -30,7 +30,11 @@ public abstract class Init : FacebookTestClass
public void BasicInit()
{
bool initComplete = false;
- this.CallInit(() => (initComplete = true));
+ this.CallInit(
+ delegate
+ {
+ initComplete = true;
+ });
Assert.IsTrue(initComplete);
}
@@ -41,7 +45,11 @@ public void InitWithLoginData()
AccessToken.CurrentAccessToken = null;
bool initComplete = false;
- this.CallInit(() => (initComplete = true));
+ this.CallInit(
+ delegate
+ {
+ initComplete = true;
+ });
Assert.IsTrue(initComplete);
AccessToken token = AccessToken.CurrentAccessToken;
diff --git a/Facebook.Unity.Tests/Login.cs b/Facebook.Unity.Tests/Login.cs
index c34a7943b..9d18e2864 100644
--- a/Facebook.Unity.Tests/Login.cs
+++ b/Facebook.Unity.Tests/Login.cs
@@ -43,7 +43,12 @@ public abstract class Login : FacebookTestClass
public void BasicLoginWithReadTest()
{
ILoginResult result = null;
- FB.LogInWithReadPermissions(null, (r) => (result = r));
+ FB.LogInWithReadPermissions(
+ null,
+ delegate(ILoginResult r)
+ {
+ result = r;
+ });
Login.ValidateToken(result, MockResults.DefaultPermissions);
}
@@ -51,7 +56,12 @@ public void BasicLoginWithReadTest()
public void BasicLoginWithReadPermissionsTest()
{
ILoginResult result = null;
- FB.LogInWithReadPermissions(this.ReadPermissions, (r) => (result = r));
+ FB.LogInWithReadPermissions(
+ this.ReadPermissions,
+ delegate(ILoginResult r)
+ {
+ result = r;
+ });
Login.ValidateToken(result, this.ReadPermissions);
}
@@ -59,7 +69,12 @@ public void BasicLoginWithReadPermissionsTest()
public void BasicLoginWithPublishTest()
{
ILoginResult result = null;
- FB.LogInWithPublishPermissions(this.PublishPermissions, (r) => (result = r));
+ FB.LogInWithPublishPermissions(
+ this.PublishPermissions,
+ delegate(ILoginResult r)
+ {
+ result = r;
+ });
Login.ValidateToken(result, this.PublishPermissions);
}
diff --git a/Facebook.Unity.Tests/Mobile/Android/MockAndroid.cs b/Facebook.Unity.Tests/Mobile/Android/MockAndroid.cs
index c61b55446..cb7792278 100644
--- a/Facebook.Unity.Tests/Mobile/Android/MockAndroid.cs
+++ b/Facebook.Unity.Tests/Mobile/Android/MockAndroid.cs
@@ -95,16 +95,6 @@ public void CallStatic(string methodName, params object[] args)
callback = this.Facebook.OnShareLinkComplete;
result = MockResults.GetGenericResult(callbackID, this.ResultExtras);
}
- else if (methodName == "GameGroupCreate")
- {
- callback = this.Facebook.OnGroupCreateComplete;
- result = MockResults.GetGroupCreateResult(callbackID, this.ResultExtras);
- }
- else if (methodName == "GameGroupJoin")
- {
- callback = this.Facebook.OnGroupJoinComplete;
- result = MockResults.GetGenericResult(callbackID, this.ResultExtras);
- }
else if (methodName == "LoginWithPublishPermissions" || methodName == "LoginWithReadPermissions")
{
callback = this.Facebook.OnLoginComplete;
diff --git a/Facebook.Unity.Tests/Mobile/AppLinks.cs b/Facebook.Unity.Tests/Mobile/AppLinks.cs
index 5921afce3..0596f56fa 100644
--- a/Facebook.Unity.Tests/Mobile/AppLinks.cs
+++ b/Facebook.Unity.Tests/Mobile/AppLinks.cs
@@ -45,7 +45,11 @@ public void TestEmptyDefferedAppLink()
{ Constants.ExtrasKey, mockExtras },
};
- FB.GetAppLink((r) => (result = r));
+ FB.GetAppLink(
+ delegate(IAppLinkResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(mockRef, result.Ref);
Assert.AreEqual(mockTargetUrl, result.TargetUrl);
@@ -68,7 +72,11 @@ public void TestSimpleDeepLink()
{ Constants.UrlKey, mockUrl },
};
- FB.GetAppLink((r) => (result = r));
+ FB.GetAppLink(
+ delegate(IAppLinkResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(mockRef, result.Ref);
Assert.AreEqual(mockTargetUrl, result.TargetUrl);
@@ -87,7 +95,11 @@ public void TestAppLink()
{ Constants.UrlKey, mockUrl },
};
- FB.GetAppLink((r) => (result = r));
+ FB.GetAppLink(
+ delegate(IAppLinkResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(mockUrl, result.Url);
}
diff --git a/Facebook.Unity.Tests/Mobile/IOS/MockIOS.cs b/Facebook.Unity.Tests/Mobile/IOS/MockIOS.cs
index 66ad7ff18..2ac3d39cd 100644
--- a/Facebook.Unity.Tests/Mobile/IOS/MockIOS.cs
+++ b/Facebook.Unity.Tests/Mobile/IOS/MockIOS.cs
@@ -137,24 +137,6 @@ public void AppInvite(
this.MobileFacebook.OnAppInviteComplete(new ResultContainer(result));
}
- public void CreateGameGroup(
- int requestId,
- string name,
- string description,
- string privacy)
- {
- this.LogMethodCall();
- var result = MockResults.GetGroupCreateResult(requestId, this.ResultExtras);
- this.Facebook.OnGroupCreateComplete(new ResultContainer(result));
- }
-
- public void JoinGameGroup(int requestId, string groupId)
- {
- this.LogMethodCall();
- var result = this.GetResultDictionary(requestId);
- this.Facebook.OnGroupJoinComplete(new ResultContainer(result));
- }
-
public void FBSettingsActivateApp(string appId)
{
this.LogMethodCall();
diff --git a/Facebook.Unity.Tests/Mobile/Login.cs b/Facebook.Unity.Tests/Mobile/Login.cs
index 76d86cd32..c4268f55c 100644
--- a/Facebook.Unity.Tests/Mobile/Login.cs
+++ b/Facebook.Unity.Tests/Mobile/Login.cs
@@ -35,7 +35,12 @@ public void TestMaxInt64ExpiredTime()
{ LoginResult.ExpirationTimestampKey, "9223372036854775" },
};
- FB.LogInWithReadPermissions(this.ReadPermissions, (r) => (result = r));
+ FB.LogInWithReadPermissions(
+ this.ReadPermissions,
+ delegate(ILoginResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.IsNotNull(AccessToken.CurrentAccessToken);
Assert.AreEqual(DateTime.MaxValue, AccessToken.CurrentAccessToken.ExpirationTime);
@@ -50,7 +55,12 @@ public void TestZeroExpiredTime()
{ LoginResult.ExpirationTimestampKey, "0" },
};
- FB.LogInWithReadPermissions(this.ReadPermissions, (r) => (result = r));
+ FB.LogInWithReadPermissions(
+ this.ReadPermissions,
+ delegate(ILoginResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.IsNotNull(AccessToken.CurrentAccessToken);
Assert.AreEqual(DateTime.MaxValue, AccessToken.CurrentAccessToken.ExpirationTime);
diff --git a/Facebook.Unity.Tests/MockResults.cs b/Facebook.Unity.Tests/MockResults.cs
index 7ba255543..76638da2f 100644
--- a/Facebook.Unity.Tests/MockResults.cs
+++ b/Facebook.Unity.Tests/MockResults.cs
@@ -105,7 +105,11 @@ public static IDictionary GetLoginResult(
var result = MockResults.GetGenericResult(requestID, extras);
object expirationTime;
- if (Constants.IsWeb)
+ if (Constants.IsGameroom)
+ {
+ expirationTime = Math.Round((MockResults.MockExpirationTimeValue - DateTime.UtcNow).TotalSeconds).ToString();
+ }
+ else if (Constants.IsWeb)
{
expirationTime = (long)(MockResults.MockExpirationTimeValue - DateTime.UtcNow).TotalSeconds;
}
diff --git a/Facebook.Unity.Tests/MockWrapper.cs b/Facebook.Unity.Tests/MockWrapper.cs
index dee9f3acd..1d00f5497 100644
--- a/Facebook.Unity.Tests/MockWrapper.cs
+++ b/Facebook.Unity.Tests/MockWrapper.cs
@@ -24,6 +24,7 @@ namespace Facebook.Unity.Tests
using System.Collections.Generic;
using System.Diagnostics;
using Facebook.Unity.Canvas;
+ using Facebook.Unity.Gameroom;
using Facebook.Unity.Mobile;
internal class MockWrapper
@@ -67,6 +68,14 @@ internal IMobileFacebookResultHandler MobileFacebook
}
}
+ internal IGameroomFacebookResultHandler GameroomFacebook
+ {
+ get
+ {
+ return this.Facebook as IGameroomFacebookResultHandler;
+ }
+ }
+
public int GetMethodCallCount(string methodName)
{
int count;
diff --git a/Facebook.Unity.Tests/Properties/AssemblyInfo.cs b/Facebook.Unity.Tests/Properties/AssemblyInfo.cs
index c2e7a2f4c..ca52c9274 100644
--- a/Facebook.Unity.Tests/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity.Tests/Properties/AssemblyInfo.cs
@@ -21,4 +21,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
diff --git a/Facebook.Unity.Tests/ShareLink.cs b/Facebook.Unity.Tests/ShareLink.cs
index 89c20806e..8d205c074 100644
--- a/Facebook.Unity.Tests/ShareLink.cs
+++ b/Facebook.Unity.Tests/ShareLink.cs
@@ -40,10 +40,13 @@ public void SimpleLinkShare()
FB.ShareLink(
new Uri("http://www.test.com/"),
- "test title",
- "test description",
- new Uri("http://www.photo.com/"),
- (r) => (result = r));
+ "test title",
+ "test description",
+ new Uri("http://www.photo.com/"),
+ delegate(IShareResult r)
+ {
+ result = r;
+ });
Assert.IsNotNull(result);
Assert.AreEqual(extras[ShareResult.PostIDKey], result.PostId);
}
diff --git a/Facebook.Unity.Tests/VersionNumberCheck.cs b/Facebook.Unity.Tests/VersionNumberCheck.cs
index 0efc2faf4..a769454c7 100644
--- a/Facebook.Unity.Tests/VersionNumberCheck.cs
+++ b/Facebook.Unity.Tests/VersionNumberCheck.cs
@@ -31,17 +31,22 @@ public class VersionNumberCheck
{
private const string UnityPluginSubPath = "UnitySDK/Assets/FacebookSDK/Plugins/";
- private static string unityRepoPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.Parent.FullName;
+ private static string unityRepoPath = Directory
+ .GetParent(TestContext.CurrentContext.TestDirectory)
+ .Parent
+ .Parent
+ .FullName;
+
private static string unityPluginPath = Path.Combine(unityRepoPath, UnityPluginSubPath);
private static string coreDLLSubPath = Path.Combine(unityPluginPath, "Facebook.Unity.dll");
- private static string arcadeDLLSubPath = Path.Combine(unityPluginPath, "Arcade/Facebook.Unity.Arcade.dll");
+ private static string gameroomDLLSubPath = Path.Combine(unityPluginPath, "Gameroom/Facebook.Unity.Gameroom.dll");
private static string editorDLLSubPath = Path.Combine(unityPluginPath, "Editor/Facebook.Unity.Editor.dll");
[Test]
public void ValidateDLLVersions()
{
VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.coreDLLSubPath);
- VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.arcadeDLLSubPath);
+ VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.gameroomDLLSubPath);
VersionNumberCheck.CheckVersionOfDll(VersionNumberCheck.editorDLLSubPath);
}
@@ -51,7 +56,7 @@ private static void CheckVersionOfDll(string dllPath)
// We only worry about version numbers x.y.z but c# appends a 4th build number for local
// builds that we don't use.
- Assert.AreEqual(FacebookSdkVersion.Build + ".0", fileVersionInfo.FileVersion);
+ Assert.AreEqual(FacebookSdkVersion.Build + ".0", fileVersionInfo.FileVersion, dllPath);
}
}
}
diff --git a/Facebook.Unity.Tests/packages.config b/Facebook.Unity.Tests/packages.config
index 1f0fa2686..04a98a749 100644
--- a/Facebook.Unity.Tests/packages.config
+++ b/Facebook.Unity.Tests/packages.config
@@ -1,4 +1,5 @@
-
+
+
\ No newline at end of file
diff --git a/Facebook.Unity/Arcade/IArcadeFacebook.cs b/Facebook.Unity/Arcade/IArcadeFacebook.cs
deleted file mode 100755
index 7e4812cec..000000000
--- a/Facebook.Unity/Arcade/IArcadeFacebook.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
- *
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
- * copy, modify, and distribute this software in source code or binary form for use
- * in connection with the web services and APIs provided by Facebook.
- *
- * As with any software that integrates with the Facebook platform, your use of
- * this software is subject to the Facebook Developer Principles and Policies
- * [http://developers.facebook.com/policy/]. This copyright notice shall be
- * included in all copies or substantial portions of the software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-namespace Facebook.Unity.Arcade
-{
- internal interface IArcadeFacebook : IPayFacebook, IFacebook
- {
- }
-}
diff --git a/Facebook.Unity/CallbackManager.cs b/Facebook.Unity/CallbackManager.cs
index a3eff3feb..5057c5457 100644
--- a/Facebook.Unity/CallbackManager.cs
+++ b/Facebook.Unity/CallbackManager.cs
@@ -71,7 +71,8 @@ private static void CallCallback(object callback, IResult result)
CallbackManager.TryCallCallback(callback, result) ||
CallbackManager.TryCallCallback(callback, result) ||
CallbackManager.TryCallCallback(callback, result) ||
- CallbackManager.TryCallCallback(callback, result))
+ CallbackManager.TryCallCallback(callback, result) ||
+ CallbackManager.TryCallCallback(callback, result))
{
return;
}
diff --git a/Facebook.Unity/Canvas/CanvasFacebook.cs b/Facebook.Unity/Canvas/CanvasFacebook.cs
index 4fede7113..fb8ba9d63 100644
--- a/Facebook.Unity/Canvas/CanvasFacebook.cs
+++ b/Facebook.Unity/Canvas/CanvasFacebook.cs
@@ -31,8 +31,6 @@ internal sealed class CanvasFacebook : FacebookBase, ICanvasFacebookImplementati
internal const string MethodAppRequests = "apprequests";
internal const string MethodFeed = "feed";
internal const string MethodPay = "pay";
- internal const string MethodGameGroupCreate = "game_group_create";
- internal const string MethodGameGroupJoin = "game_group_join";
internal const string CancelledResponse = "{\"cancelled\":true}";
internal const string FacebookConnectURL = "https://connect.facebook.net";
@@ -321,34 +319,6 @@ public void PayWithProductId(
callback);
}
- public override void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback)
- {
- MethodArguments args = new MethodArguments();
- args.AddString("name", name);
- args.AddString("description", description);
- args.AddString("privacy", privacy);
- args.AddString("display", "async");
- var call = new CanvasUIMethodCall(this, MethodGameGroupCreate, Constants.OnGroupCreateCompleteMethodName);
- call.Callback = callback;
- call.Call(args);
- }
-
- public override void GameGroupJoin(
- string id,
- FacebookDelegate callback)
- {
- MethodArguments args = new MethodArguments();
- args.AddString("id", id);
- args.AddString("display", "async");
- var call = new CanvasUIMethodCall(this, MethodGameGroupJoin, Constants.OnGroupJoinCompleteMethodName);
- call.Callback = callback;
- call.Call(args);
- }
-
public override void GetAppLink(FacebookDelegate callback)
{
var result = new Dictionary()
@@ -442,18 +412,6 @@ public override void OnShareLinkComplete(ResultContainer resultContainer)
CallbackManager.OnFacebookResponse(result);
}
- public override void OnGroupCreateComplete(ResultContainer resultContainer)
- {
- var result = new GroupCreateResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
- public override void OnGroupJoinComplete(ResultContainer resultContainer)
- {
- var result = new GroupJoinResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
public void OnUrlResponse(string url)
{
this.appLinkUrl = url;
diff --git a/Facebook.Unity/Canvas/JsBridge.cs b/Facebook.Unity/Canvas/JsBridge.cs
index 6ae734873..932c61873 100644
--- a/Facebook.Unity/Canvas/JsBridge.cs
+++ b/Facebook.Unity/Canvas/JsBridge.cs
@@ -57,16 +57,6 @@ public void OnShareLinkComplete(string responseJsonData = "")
this.facebook.OnShareLinkComplete(responseJsonData);
}
- public void OnGroupCreateComplete(string responseJsonData = "")
- {
- this.facebook.OnGroupCreateComplete(responseJsonData);
- }
-
- public void OnJoinGroupComplete(string responseJsonData = "")
- {
- this.facebook.OnGroupJoinComplete(responseJsonData);
- }
-
public void OnFacebookFocus(string state)
{
this.facebook.OnHideUnity(state != "hide");
diff --git a/Facebook.Unity/Constants.cs b/Facebook.Unity/Constants.cs
index 1faacf0ee..e2331bbc9 100644
--- a/Facebook.Unity/Constants.cs
+++ b/Facebook.Unity/Constants.cs
@@ -35,6 +35,7 @@ internal static class Constants
public const string TargetUrlKey = "target_url";
public const string CancelledKey = "cancelled";
public const string ErrorKey = "error";
+ public const string HasLicenseKey = "has_license";
// Callback Method Names
public const string OnPayCompleteMethodName = "OnPayComplete";
@@ -112,11 +113,11 @@ public static bool IsWeb
}
}
- public static bool IsArcade
+ public static bool IsGameroom
{
get
{
- return Constants.CurrentPlatform == FacebookUnityPlatform.Arcade;
+ return Constants.CurrentPlatform == FacebookUnityPlatform.Gameroom;
}
}
@@ -184,7 +185,7 @@ private static FacebookUnityPlatform GetCurrentPlatform()
case RuntimePlatform.WebGLPlayer:
return FacebookUnityPlatform.WebGL;
case RuntimePlatform.WindowsPlayer:
- return FacebookUnityPlatform.Arcade;
+ return FacebookUnityPlatform.Gameroom;
default:
return FacebookUnityPlatform.Unknown;
}
diff --git a/Facebook.Unity/FB.cs b/Facebook.Unity/FB.cs
index 35e488cb4..a7518a5bf 100644
--- a/Facebook.Unity/FB.cs
+++ b/Facebook.Unity/FB.cs
@@ -22,7 +22,7 @@ namespace Facebook.Unity
{
using System;
using System.Collections.Generic;
- using Facebook.Unity.Arcade;
+ using Facebook.Unity.Gameroom;
using Facebook.Unity.Canvas;
using Facebook.Unity.Editor;
using Facebook.Unity.Mobile;
@@ -294,12 +294,12 @@ public static void Init(
};
ComponentFactory.GetComponent();
break;
- case FacebookUnityPlatform.Arcade:
+ case FacebookUnityPlatform.Gameroom:
FB.OnDLLLoadedDelegate = delegate
{
- ((ArcadeFacebook)FB.facebook).Init(appId, onHideUnity, onInitComplete);
+ ((GameroomFacebook)FB.facebook).Init(appId, onHideUnity, onInitComplete);
};
- ComponentFactory.GetComponent();
+ ComponentFactory.GetComponent();
break;
default:
throw new NotSupportedException("The facebook sdk does not support this platform");
@@ -619,39 +619,6 @@ public static void GetAppLink(
FacebookImpl.GetAppLink(callback);
}
- ///
- /// Opens a dialog to create a new game group.
- ///
- /// The name of the group you wish to create.
- /// A short description of the group's purpose.
- ///
- /// The privacy of the group.
- /// OPEN groups' content is visible to anyone
- /// CLOSED groups can be found by anyone but their content is only visible to members
- /// SECRET groups can only be found by their members.
- ///
- /// The callback to use upon completion.
- public static void GameGroupCreate(
- string name,
- string description,
- string privacy = "CLOSED",
- FacebookDelegate callback = null)
- {
- FacebookImpl.GameGroupCreate(name, description, privacy, callback);
- }
-
- ///
- /// Opens a dialog to join a game group.
- ///
- /// The group ID of the group to which you'd like to add the user.
- /// The callback to use upon completion.
- public static void GameGroupJoin(
- string id,
- FacebookDelegate callback = null)
- {
- FacebookImpl.GameGroupJoin(id, callback);
- }
-
///
/// Logs an app event.
///
@@ -971,6 +938,35 @@ public static string KeyHash
}
}
+ public sealed class Gameroom
+ {
+ private static IGameroomFacebook GameroomFacebookImpl
+ {
+ get
+ {
+ IGameroomFacebook impl = FacebookImpl as IGameroomFacebook;
+ if (impl == null)
+ {
+ throw new InvalidOperationException("Attempt to call Gameroom interface on non Windows platform");
+ }
+
+ return impl;
+ }
+ }
+
+ public static void PayPremium(
+ FacebookDelegate callback = null)
+ {
+ Gameroom.GameroomFacebookImpl.PayPremium(callback);
+ }
+
+ public static void HasLicense(
+ FacebookDelegate callback = null)
+ {
+ Gameroom.GameroomFacebookImpl.HasLicense(callback);
+ }
+ }
+
internal abstract class CompiledFacebookLoader : MonoBehaviour
{
protected abstract FacebookGameObject FBGameObject { get; }
diff --git a/Facebook.Unity/Facebook.Unity.csproj b/Facebook.Unity/Facebook.Unity.csproj
index aa4f2ea2f..5d90ca212 100644
--- a/Facebook.Unity/Facebook.Unity.csproj
+++ b/Facebook.Unity/Facebook.Unity.csproj
@@ -69,13 +69,6 @@
-
-
-
-
-
-
-
@@ -138,6 +131,15 @@
+
+
+
+
+
+
+
+
+
diff --git a/Facebook.Unity/FacebookBase.cs b/Facebook.Unity/FacebookBase.cs
index faac26888..ebe0cd78a 100644
--- a/Facebook.Unity/FacebookBase.cs
+++ b/Facebook.Unity/FacebookBase.cs
@@ -160,16 +160,6 @@ public void API(
FBUnityUtility.AsyncRequestStringWrapper.Request(this.GetGraphUrl(query), method, formData, callback);
}
- public abstract void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback);
-
- public abstract void GameGroupJoin(
- string id,
- FacebookDelegate callback);
-
public abstract void ActivateApp(string appId = null);
public abstract void GetAppLink(FacebookDelegate callback);
@@ -212,10 +202,6 @@ public void OnLogoutComplete(ResultContainer resultContainer)
public abstract void OnGetAppLinkComplete(ResultContainer resultContainer);
- public abstract void OnGroupCreateComplete(ResultContainer resultContainer);
-
- public abstract void OnGroupJoinComplete(ResultContainer resultContainer);
-
public abstract void OnAppRequestsComplete(ResultContainer resultContainer);
public abstract void OnShareLinkComplete(ResultContainer resultContainer);
diff --git a/Facebook.Unity/FacebookGameObject.cs b/Facebook.Unity/FacebookGameObject.cs
index 3092d0f38..0396cc71a 100644
--- a/Facebook.Unity/FacebookGameObject.cs
+++ b/Facebook.Unity/FacebookGameObject.cs
@@ -77,16 +77,6 @@ public void OnGetAppLinkComplete(string message)
this.Facebook.OnGetAppLinkComplete(new ResultContainer(message));
}
- public void OnGroupCreateComplete(string message)
- {
- this.Facebook.OnGroupCreateComplete(new ResultContainer(message));
- }
-
- public void OnGroupJoinComplete(string message)
- {
- this.Facebook.OnGroupJoinComplete(new ResultContainer(message));
- }
-
public void OnAppRequestsComplete(string message)
{
this.Facebook.OnAppRequestsComplete(new ResultContainer(message));
diff --git a/Facebook.Unity/FacebookSdkVersion.cs b/Facebook.Unity/FacebookSdkVersion.cs
index d206ae34d..e3b86716e 100644
--- a/Facebook.Unity/FacebookSdkVersion.cs
+++ b/Facebook.Unity/FacebookSdkVersion.cs
@@ -33,7 +33,7 @@ public static string Build
{
get
{
- return "7.9.0";
+ return "7.10.0";
}
}
}
diff --git a/Facebook.Unity/FacebookUnityPlatform.cs b/Facebook.Unity/FacebookUnityPlatform.cs
index f9fa5782e..d15069b16 100644
--- a/Facebook.Unity/FacebookUnityPlatform.cs
+++ b/Facebook.Unity/FacebookUnityPlatform.cs
@@ -28,6 +28,6 @@ internal enum FacebookUnityPlatform
Android,
IOS,
WebGL,
- Arcade
+ Gameroom
}
}
diff --git a/Facebook.Unity/Arcade/ArcadeFacebook.cs b/Facebook.Unity/Gameroom/GameroomFacebook.cs
old mode 100755
new mode 100644
similarity index 82%
rename from Facebook.Unity/Arcade/ArcadeFacebook.cs
rename to Facebook.Unity/Gameroom/GameroomFacebook.cs
index 3004ac6f6..24012ff3a
--- a/Facebook.Unity/Arcade/ArcadeFacebook.cs
+++ b/Facebook.Unity/Gameroom/GameroomFacebook.cs
@@ -18,25 +18,25 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
using System;
using System.Collections.Generic;
using System.Reflection;
- internal sealed class ArcadeFacebook : FacebookBase,
- IArcadeFacebookImplementation
+ internal sealed class GameroomFacebook : FacebookBase,
+ IGameroomFacebookImplementation
{
private string appId;
- private IArcadeWrapper arcadeWrapper;
+ private IGameroomWrapper gameroomWrapper;
- public ArcadeFacebook() : this(GetArcadeWrapper(), new CallbackManager())
+ public GameroomFacebook() : this(GetGameroomWrapper(), new CallbackManager())
{
}
- public ArcadeFacebook(IArcadeWrapper arcadeWrapper, CallbackManager callbackManager) : base(callbackManager)
+ public GameroomFacebook(IGameroomWrapper gameroomWrapper, CallbackManager callbackManager) : base(callbackManager)
{
- this.arcadeWrapper = arcadeWrapper;
+ this.gameroomWrapper = gameroomWrapper;
}
public delegate void OnComplete(ResultContainer resultContainer);
@@ -47,7 +47,7 @@ public override string SDKName
{
get
{
- return "FBArcadeSDK";
+ return "FBGameroomSDK";
}
}
@@ -66,19 +66,8 @@ public void Init(
{
base.Init(onInitComplete);
this.appId = appId;
-
- string accessTokenInfo;
- Utilities.CommandLineArguments.TryGetValue("/access_token", out accessTokenInfo);
- if (accessTokenInfo != null)
- {
- accessTokenInfo = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(accessTokenInfo));
- this.OnInitComplete(new ResultContainer(accessTokenInfo));
- }
- else
- {
- this.OnInitComplete(new ResultContainer(string.Empty));
- }
- }
+ this.gameroomWrapper.Init(this.OnInitComplete);
+ }
public override void ActivateApp(string appId = null)
{
@@ -157,7 +146,7 @@ public override void AppRequest(
}
}
- this.arcadeWrapper.DoAppRequestRequest(
+ this.gameroomWrapper.DoAppRequestRequest(
this.appId,
message,
actionType != null ? actionType.ToString() : null,
@@ -182,7 +171,7 @@ public override void FeedShare(
string mediaSource,
FacebookDelegate callback)
{
- this.arcadeWrapper.DoFeedShareRequest(
+ this.gameroomWrapper.DoFeedShareRequest(
this.appId,
toId,
link != null ? link.ToString() : null,
@@ -284,20 +273,22 @@ public void PayWithProductId(
callback);
}
- public override void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback)
+ public void PayPremium(
+ FacebookDelegate callback)
{
- throw new NotSupportedException();
+ this.gameroomWrapper.DoPayPremiumRequest(
+ this.appId,
+ this.CallbackManager.AddFacebookDelegate(callback),
+ this.OnPayComplete);
}
- public override void GameGroupJoin(
- string id,
- FacebookDelegate callback)
+ public void HasLicense(
+ FacebookDelegate callback)
{
- throw new NotSupportedException();
+ this.gameroomWrapper.DoHasLicenseRequest(
+ this.appId,
+ this.CallbackManager.AddFacebookDelegate(callback),
+ this.OnHasLicenseComplete);
}
public override void GetAppLink(
@@ -330,16 +321,6 @@ public override void OnGetAppLinkComplete(ResultContainer resultContainer)
throw new NotSupportedException();
}
- public override void OnGroupCreateComplete(ResultContainer resultContainer)
- {
- throw new NotSupportedException();
- }
-
- public override void OnGroupJoinComplete(ResultContainer resultContainer)
- {
- throw new NotSupportedException();
- }
-
public override void OnLoginComplete(ResultContainer resultContainer)
{
this.OnAuthResponse(new LoginResult(resultContainer));
@@ -355,26 +336,31 @@ public void OnPayComplete(ResultContainer resultContainer)
CallbackManager.OnFacebookResponse(new PayResult(resultContainer));
}
+ public void OnHasLicenseComplete(ResultContainer resultContainer)
+ {
+ CallbackManager.OnFacebookResponse(new HasLicenseResult(resultContainer));
+ }
+
public bool HaveReceivedPipeResponse()
{
- return this.arcadeWrapper.PipeResponse != null;
+ return this.gameroomWrapper.PipeResponse != null;
}
public string GetPipeResponse(string callbackId)
{
- var response = this.arcadeWrapper.PipeResponse;
- this.arcadeWrapper.PipeResponse = null;
+ var response = this.gameroomWrapper.PipeResponse;
+ this.gameroomWrapper.PipeResponse = null;
response.Add(Constants.CallbackIdKey, callbackId);
var jsonSerialization = Utilities.ToJson(response);
return jsonSerialization;
}
- private static IArcadeWrapper GetArcadeWrapper()
+ private static IGameroomWrapper GetGameroomWrapper()
{
- Assembly assembly = Assembly.Load("Facebook.Unity.Arcade");
- Type type = assembly.GetType("Facebook.Unity.Arcade.ArcadeWrapper");
- IArcadeWrapper arcadeWrapper = (IArcadeWrapper)Activator.CreateInstance(type);
- return arcadeWrapper;
+ Assembly assembly = Assembly.Load("Facebook.Unity.Gameroom");
+ Type type = assembly.GetType("Facebook.Unity.Gameroom.GameroomWrapper");
+ IGameroomWrapper gameroomWrapper = (IGameroomWrapper)Activator.CreateInstance(type);
+ return gameroomWrapper;
}
private void PayImpl(
@@ -390,7 +376,7 @@ private void PayImpl(
string developerPayload,
FacebookDelegate callback)
{
- this.arcadeWrapper.DoPayRequest(
+ this.gameroomWrapper.DoPayRequest(
this.appId,
"pay",
action,
@@ -411,7 +397,7 @@ private void LoginWithPermissions(
IEnumerable scope,
FacebookDelegate callback)
{
- this.arcadeWrapper.DoLoginRequest(
+ this.gameroomWrapper.DoLoginRequest(
this.appId,
scope.ToCommaSeparateList(),
this.CallbackManager.AddFacebookDelegate(callback),
diff --git a/Facebook.Unity/Arcade/ArcadeFacebookGameObject.cs b/Facebook.Unity/Gameroom/GameroomFacebookGameObject.cs
old mode 100755
new mode 100644
similarity index 73%
rename from Facebook.Unity/Arcade/ArcadeFacebookGameObject.cs
rename to Facebook.Unity/Gameroom/GameroomFacebookGameObject.cs
index 8c060a0df..51354d750
--- a/Facebook.Unity/Arcade/ArcadeFacebookGameObject.cs
+++ b/Facebook.Unity/Gameroom/GameroomFacebookGameObject.cs
@@ -18,22 +18,22 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
using System.Collections;
- internal class ArcadeFacebookGameObject : FacebookGameObject, IFacebookCallbackHandler
+ internal class GameroomFacebookGameObject : FacebookGameObject, IFacebookCallbackHandler
{
- protected IArcadeFacebookImplementation ArcadeFacebookImpl
+ protected IGameroomFacebookImplementation GameroomFacebookImpl
{
get
{
- return (IArcadeFacebookImplementation)this.Facebook;
+ return (IGameroomFacebookImplementation)this.Facebook;
}
}
public void WaitForResponse(
- ArcadeFacebook.OnComplete onCompleteDelegate,
+ GameroomFacebook.OnComplete onCompleteDelegate,
string callbackId)
{
this.StartCoroutine(this.WaitForPipeResponse(onCompleteDelegate, callbackId));
@@ -44,15 +44,15 @@ protected override void OnAwake()
}
private IEnumerator WaitForPipeResponse(
- ArcadeFacebook.OnComplete onCompleteDelegate,
+ GameroomFacebook.OnComplete onCompleteDelegate,
string callbackId)
{
- while (!this.ArcadeFacebookImpl.HaveReceivedPipeResponse())
+ while (!this.GameroomFacebookImpl.HaveReceivedPipeResponse())
{
yield return null;
}
- onCompleteDelegate(new ResultContainer(this.ArcadeFacebookImpl.GetPipeResponse(callbackId)));
+ onCompleteDelegate(new ResultContainer(this.GameroomFacebookImpl.GetPipeResponse(callbackId)));
}
}
}
diff --git a/Facebook.Unity/Arcade/ArcadeFacebookLoader.cs b/Facebook.Unity/Gameroom/GameroomFacebookLoader.cs
old mode 100755
new mode 100644
similarity index 78%
rename from Facebook.Unity/Arcade/ArcadeFacebookLoader.cs
rename to Facebook.Unity/Gameroom/GameroomFacebookLoader.cs
index 318cca118..b23139f08
--- a/Facebook.Unity/Arcade/ArcadeFacebookLoader.cs
+++ b/Facebook.Unity/Gameroom/GameroomFacebookLoader.cs
@@ -18,21 +18,21 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
- internal class ArcadeFacebookLoader : FB.CompiledFacebookLoader
+ internal class GameroomFacebookLoader : FB.CompiledFacebookLoader
{
protected override FacebookGameObject FBGameObject
{
get
{
- ArcadeFacebookGameObject arcadeFB = ComponentFactory.GetComponent();
- if (arcadeFB.Facebook == null)
+ GameroomFacebookGameObject gameroomFB = ComponentFactory.GetComponent();
+ if (gameroomFB.Facebook == null)
{
- arcadeFB.Facebook = new ArcadeFacebook();
+ gameroomFB.Facebook = new GameroomFacebook();
}
- return arcadeFB;
+ return gameroomFB;
}
}
}
diff --git a/Facebook.Unity.Tests/Mobile/IOS/AppGroup.cs b/Facebook.Unity/Gameroom/IGameroomFacebook.cs
similarity index 82%
rename from Facebook.Unity.Tests/Mobile/IOS/AppGroup.cs
rename to Facebook.Unity/Gameroom/IGameroomFacebook.cs
index 360017665..07c5ba36c 100644
--- a/Facebook.Unity.Tests/Mobile/IOS/AppGroup.cs
+++ b/Facebook.Unity/Gameroom/IGameroomFacebook.cs
@@ -18,13 +18,12 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Tests.Mobile.IOS
+namespace Facebook.Unity.Gameroom
{
- using NUnit.Framework;
-
- [IOSTest]
- [TestFixture]
- public class AppGroup : Facebook.Unity.Tests.AppGroup
+ internal interface IGameroomFacebook : IPayFacebook, IFacebook
{
+ void PayPremium(FacebookDelegate callback);
+
+ void HasLicense(FacebookDelegate callback);
}
}
diff --git a/Facebook.Unity/Arcade/IArcadeFacebookImplementation.cs b/Facebook.Unity/Gameroom/IGameroomFacebookImplementation.cs
old mode 100755
new mode 100644
similarity index 89%
rename from Facebook.Unity/Arcade/IArcadeFacebookImplementation.cs
rename to Facebook.Unity/Gameroom/IGameroomFacebookImplementation.cs
index 755bad00a..d995430f7
--- a/Facebook.Unity/Arcade/IArcadeFacebookImplementation.cs
+++ b/Facebook.Unity/Gameroom/IGameroomFacebookImplementation.cs
@@ -18,9 +18,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
- internal interface IArcadeFacebookImplementation : IArcadeFacebook, IArcadeFacebookResultHandler
+ internal interface IGameroomFacebookImplementation : IGameroomFacebook, IGameroomFacebookResultHandler
{
bool HaveReceivedPipeResponse();
diff --git a/Facebook.Unity/Arcade/IArcadeFacebookResultHandler.cs b/Facebook.Unity/Gameroom/IGameroomFacebookResultHandler.cs
old mode 100755
new mode 100644
similarity index 90%
rename from Facebook.Unity/Arcade/IArcadeFacebookResultHandler.cs
rename to Facebook.Unity/Gameroom/IGameroomFacebookResultHandler.cs
index fbb94eb2a..cc7a4a620
--- a/Facebook.Unity/Arcade/IArcadeFacebookResultHandler.cs
+++ b/Facebook.Unity/Gameroom/IGameroomFacebookResultHandler.cs
@@ -18,9 +18,9 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
- internal interface IArcadeFacebookResultHandler : IFacebookResultHandler
+ internal interface IGameroomFacebookResultHandler : IFacebookResultHandler
{
}
}
diff --git a/Facebook.Unity/Arcade/IArcadeWrapper.cs b/Facebook.Unity/Gameroom/IGameroomWrapper.cs
similarity index 78%
rename from Facebook.Unity/Arcade/IArcadeWrapper.cs
rename to Facebook.Unity/Gameroom/IGameroomWrapper.cs
index 4ebdc41c9..6b86e53d7 100644
--- a/Facebook.Unity/Arcade/IArcadeWrapper.cs
+++ b/Facebook.Unity/Gameroom/IGameroomWrapper.cs
@@ -18,19 +18,21 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
-namespace Facebook.Unity.Arcade
+namespace Facebook.Unity.Gameroom
{
using System.Collections.Generic;
- internal interface IArcadeWrapper
+ internal interface IGameroomWrapper
{
IDictionary PipeResponse { get; set; }
+ void Init(GameroomFacebook.OnComplete completeDelegate);
+
void DoLoginRequest(
string appID,
string permissions,
string callbackID,
- ArcadeFacebook.OnComplete completeDelegate);
+ GameroomFacebook.OnComplete completeDelegate);
void DoPayRequest(
string appId,
@@ -46,7 +48,7 @@ void DoPayRequest(
string testCurrency,
string developerPayload,
string callbackID,
- ArcadeFacebook.OnComplete completeDelegate);
+ GameroomFacebook.OnComplete completeDelegate);
void DoFeedShareRequest(
string appId,
@@ -58,7 +60,7 @@ void DoFeedShareRequest(
string pictureLink,
string mediaSource,
string callbackID,
- ArcadeFacebook.OnComplete completeDelegate);
+ GameroomFacebook.OnComplete completeDelegate);
void DoAppRequestRequest(
string appId,
@@ -72,6 +74,16 @@ void DoAppRequestRequest(
string data,
string title,
string callbackID,
- ArcadeFacebook.OnComplete completeDelegate);
+ GameroomFacebook.OnComplete completeDelegate);
+
+ void DoPayPremiumRequest(
+ string appId,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate);
+
+ void DoHasLicenseRequest(
+ string appId,
+ string callbackID,
+ GameroomFacebook.OnComplete completeDelegate);
}
}
diff --git a/Facebook.Unity/IFacebook.cs b/Facebook.Unity/IFacebook.cs
index 174625f7e..2e90b553c 100644
--- a/Facebook.Unity/IFacebook.cs
+++ b/Facebook.Unity/IFacebook.cs
@@ -88,16 +88,6 @@ void FeedShare(
string mediaSource,
FacebookDelegate callback);
- void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback);
-
- void GameGroupJoin(
- string id,
- FacebookDelegate callback);
-
void API(
string query,
HttpMethod method,
diff --git a/Facebook.Unity/IFacebookCallbackHandler.cs b/Facebook.Unity/IFacebookCallbackHandler.cs
index a51b82ed4..54aa879b0 100644
--- a/Facebook.Unity/IFacebookCallbackHandler.cs
+++ b/Facebook.Unity/IFacebookCallbackHandler.cs
@@ -30,10 +30,6 @@ internal interface IFacebookCallbackHandler
void OnGetAppLinkComplete(string message);
- void OnGroupCreateComplete(string message);
-
- void OnGroupJoinComplete(string message);
-
void OnAppRequestsComplete(string message);
void OnShareLinkComplete(string message);
diff --git a/Facebook.Unity/IFacebookResultHandler.cs b/Facebook.Unity/IFacebookResultHandler.cs
index 81819c63b..8534ae06b 100644
--- a/Facebook.Unity/IFacebookResultHandler.cs
+++ b/Facebook.Unity/IFacebookResultHandler.cs
@@ -32,10 +32,6 @@ internal interface IFacebookResultHandler
void OnGetAppLinkComplete(ResultContainer resultContainer);
- void OnGroupCreateComplete(ResultContainer resultContainer);
-
- void OnGroupJoinComplete(ResultContainer resultContainer);
-
void OnAppRequestsComplete(ResultContainer resultContainer);
void OnShareLinkComplete(ResultContainer resultContainer);
diff --git a/Facebook.Unity/Mobile/Android/AndroidFacebook.cs b/Facebook.Unity/Mobile/Android/AndroidFacebook.cs
index a3831b51a..ae6119ba0 100644
--- a/Facebook.Unity/Mobile/Android/AndroidFacebook.cs
+++ b/Facebook.Unity/Mobile/Android/AndroidFacebook.cs
@@ -224,32 +224,6 @@ public override void FeedShare(
call.Call(args);
}
- public override void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback)
- {
- MethodArguments args = new MethodArguments();
- args.AddString("name", name);
- args.AddString("description", description);
- args.AddString("privacy", privacy);
- var gameGroupCreate = new JavaMethodCall(this, "GameGroupCreate");
- gameGroupCreate.Callback = callback;
- gameGroupCreate.Call(args);
- }
-
- public override void GameGroupJoin(
- string id,
- FacebookDelegate callback)
- {
- MethodArguments args = new MethodArguments();
- args.AddString("id", id);
- var groupJoinCall = new JavaMethodCall(this, "GameGroupJoin");
- groupJoinCall.Callback = callback;
- groupJoinCall.Call(args);
- }
-
public override void GetAppLink(
FacebookDelegate callback)
{
diff --git a/Facebook.Unity/Mobile/IOS/IIOSWrapper.cs b/Facebook.Unity/Mobile/IOS/IIOSWrapper.cs
index 83a6a156f..be57aef89 100644
--- a/Facebook.Unity/Mobile/IOS/IIOSWrapper.cs
+++ b/Facebook.Unity/Mobile/IOS/IIOSWrapper.cs
@@ -77,14 +77,6 @@ void AppInvite(
string appLinkUrl,
string previewImageUrl);
- void CreateGameGroup(
- int requestId,
- string name,
- string description,
- string privacy);
-
- void JoinGameGroup(int requestId, string groupId);
-
void FBSettingsActivateApp(string appId);
void LogAppEvent(
diff --git a/Facebook.Unity/Mobile/IOS/IOSFacebook.cs b/Facebook.Unity/Mobile/IOS/IOSFacebook.cs
index 8f369228e..6f44246e8 100644
--- a/Facebook.Unity/Mobile/IOS/IOSFacebook.cs
+++ b/Facebook.Unity/Mobile/IOS/IOSFacebook.cs
@@ -228,22 +228,6 @@ public override void FeedShare(
mediaSource);
}
- public override void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback)
- {
- this.iosWrapper.CreateGameGroup(this.AddCallback(callback), name, description, privacy);
- }
-
- public override void GameGroupJoin(
- string id,
- FacebookDelegate callback)
- {
- this.iosWrapper.JoinGameGroup(System.Convert.ToInt32(CallbackManager.AddFacebookDelegate(callback)), id);
- }
-
public override void AppEventsLogEvent(
string logEvent,
float? valueToSum,
diff --git a/Facebook.Unity/Mobile/MobileFacebook.cs b/Facebook.Unity/Mobile/MobileFacebook.cs
index d8843a809..fb8df8c5b 100644
--- a/Facebook.Unity/Mobile/MobileFacebook.cs
+++ b/Facebook.Unity/Mobile/MobileFacebook.cs
@@ -76,18 +76,6 @@ public override void OnGetAppLinkComplete(ResultContainer resultContainer)
CallbackManager.OnFacebookResponse(result);
}
- public override void OnGroupCreateComplete(ResultContainer resultContainer)
- {
- var result = new GroupCreateResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
- public override void OnGroupJoinComplete(ResultContainer resultContainer)
- {
- var result = new GroupJoinResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
public override void OnAppRequestsComplete(ResultContainer resultContainer)
{
var result = new AppRequestResult(resultContainer);
diff --git a/Facebook.Unity/PlatformEditor/EditorFacebook.cs b/Facebook.Unity/PlatformEditor/EditorFacebook.cs
index f9abaaaa0..44cdef58f 100644
--- a/Facebook.Unity/PlatformEditor/EditorFacebook.cs
+++ b/Facebook.Unity/PlatformEditor/EditorFacebook.cs
@@ -146,29 +146,9 @@ public override void FeedShare(
this.CallbackManager.AddFacebookDelegate(callback));
}
- public override void GameGroupCreate(
- string name,
- string description,
- string privacy,
- FacebookDelegate callback)
- {
- this.editorWrapper.ShowGameGroupCreateMockDialog(
- this.OnGroupCreateComplete,
- this.CallbackManager.AddFacebookDelegate(callback));
- }
-
- public override void GameGroupJoin(
- string id,
- FacebookDelegate callback)
- {
- this.editorWrapper.ShowGameGroupJoinMockDialog(
- this.OnGroupJoinComplete,
- this.CallbackManager.AddFacebookDelegate(callback));
- }
-
public override void ActivateApp(string appId)
{
- FacebookLogger.Info("This only needs to be called for iOS or Android.");
+ FacebookLogger.Log("Pew! Pretending to send this off. Doesn't actually work in the editor");
}
public override void GetAppLink(FacebookDelegate callback)
@@ -307,18 +287,6 @@ public override void OnGetAppLinkComplete(ResultContainer resultContainer)
CallbackManager.OnFacebookResponse(result);
}
- public override void OnGroupCreateComplete(ResultContainer resultContainer)
- {
- var result = new GroupCreateResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
- public override void OnGroupJoinComplete(ResultContainer resultContainer)
- {
- var result = new GroupJoinResult(resultContainer);
- CallbackManager.OnFacebookResponse(result);
- }
-
public override void OnLoginComplete(ResultContainer resultContainer)
{
var result = new LoginResult(resultContainer);
diff --git a/Facebook.Unity/Properties/AssemblyInfo.cs b/Facebook.Unity/Properties/AssemblyInfo.cs
index 02ce96097..60a462bb4 100644
--- a/Facebook.Unity/Properties/AssemblyInfo.cs
+++ b/Facebook.Unity/Properties/AssemblyInfo.cs
@@ -21,9 +21,9 @@
using System.Reflection;
using System.Runtime.CompilerServices;
-[assembly: AssemblyVersion("7.9.0")]
+[assembly: AssemblyVersion("7.10.0")]
[assembly: InternalsVisibleTo("Assembly-CSharp")]
[assembly: InternalsVisibleTo("Facebook.Unity.Android")]
-[assembly: InternalsVisibleTo("Facebook.Unity.Arcade")]
+[assembly: InternalsVisibleTo("Facebook.Unity.Gameroom")]
[assembly: InternalsVisibleTo("Facebook.Unity.IOS")]
[assembly: InternalsVisibleTo("Facebook.Unity.Tests")]
diff --git a/Facebook.Unity/Results/HasLicenseResult.cs b/Facebook.Unity/Results/HasLicenseResult.cs
new file mode 100644
index 000000000..84cc53571
--- /dev/null
+++ b/Facebook.Unity/Results/HasLicenseResult.cs
@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+namespace Facebook.Unity
+{
+ using System.Collections.Generic;
+
+ internal class HasLicenseResult : ResultBase, IHasLicenseResult
+ {
+ public HasLicenseResult(ResultContainer resultContainer) : base(resultContainer)
+ {
+ if (this.ResultDictionary != null)
+ {
+ bool hasLicense;
+ if (this.ResultDictionary.TryGetValue (Constants.HasLicenseKey, out hasLicense)) {
+ this.HasLicense = hasLicense;
+ }
+ }
+ }
+
+ public bool HasLicense { get; private set; }
+ }
+}
diff --git a/Facebook.Unity/Results/IHasLicenseResult.cs b/Facebook.Unity/Results/IHasLicenseResult.cs
new file mode 100644
index 000000000..ea49d0750
--- /dev/null
+++ b/Facebook.Unity/Results/IHasLicenseResult.cs
@@ -0,0 +1,34 @@
+/**
+ * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
+ *
+ * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
+ * copy, modify, and distribute this software in source code or binary form for use
+ * in connection with the web services and APIs provided by Facebook.
+ *
+ * As with any software that integrates with the Facebook platform, your use of
+ * this software is subject to the Facebook Developer Principles and Policies
+ * [http://developers.facebook.com/policy/]. This copyright notice shall be
+ * included in all copies or substantial portions of the software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+namespace Facebook.Unity
+{
+ ///
+ /// The license check for premium games result.
+ ///
+ public interface IHasLicenseResult : IResult
+ {
+ ///
+ /// Gets if the user has a license to play the game.
+ ///
+ /// The access token.
+ bool HasLicense { get; }
+ }
+}
diff --git a/Facebook.Unity/Utils/Utilities.cs b/Facebook.Unity/Utils/Utilities.cs
index 3dbaed126..e242e5aa7 100644
--- a/Facebook.Unity/Utils/Utilities.cs
+++ b/Facebook.Unity/Utils/Utilities.cs
@@ -201,7 +201,7 @@ private static DateTime ParseExpirationDateFromResult(IDictionary 0)
{
- if (Constants.IsArcade)
+ if (Constants.IsGameroom)
{
expiration = DateTime.UtcNow.AddSeconds(expiredTimeSeconds);
}
diff --git a/Facebook.sln b/Facebook.sln
index 0f1267be2..cf457ec10 100644
--- a/Facebook.sln
+++ b/Facebook.sln
@@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Tests", "Facebook.Unity.Tests\Facebook.Unity.Tests.csproj", "{4A088D45-0F5D-400B-9FF6-5AAF3ED10D9A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Arcade", "Facebook.Unity.Arcade\Facebook.Unity.Arcade.csproj", "{D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity", "Facebook.Unity\Facebook.Unity.csproj", "{3DFF6C0C-BB04-405D-A23F-95999630E7F8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Editor", "Facebook.Unity.Editor\Facebook.Unity.Editor.csproj", "{4F631992-8D32-4AB5-8073-4BDC8A79380B}"
@@ -19,12 +17,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Android.Stri
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.IOS.StrippingHack", "Facebook.Unity.IOS.StrippingHack\Facebook.Unity.IOS.StrippingHack.csproj", "{15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facebook.Unity.Gameroom", "Facebook.Unity.Gameroom\Facebook.Unity.Gameroom.csproj", "{D8F7CF97-7FE9-48B7-A30C-CB14BAA73010}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.Build.0 = Release|Any CPU
{3DFF6C0C-BB04-405D-A23F-95999630E7F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3DFF6C0C-BB04-405D-A23F-95999630E7F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3DFF6C0C-BB04-405D-A23F-95999630E7F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -41,6 +45,10 @@ Global
{BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA9BAAC5-5D12-460A-A8B3-428CC1F1CCC6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.Build.0 = Release|Any CPU
{D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D3DF5151-7271-4CBA-8F91-85B7845E2FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -53,14 +61,6 @@ Global
{E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9D1DFF6-9C2E-4954-95FD-A6F22B4D0121}.Release|Any CPU.Build.0 = Release|Any CPU
- {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CDB20BC1-DC6F-46BD-9FBB-7F689E790B1B}.Release|Any CPU.Build.0 = Release|Any CPU
- {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {15A3CC9F-9BB6-41A4-813B-40D2CAA91F27}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
version =
diff --git a/UnitySDK/Assets/FacebookSDK/Examples/GameGroups.unity b/UnitySDK/Assets/FacebookSDK/Examples/GameGroups.unity
deleted file mode 100644
index e255d881d..000000000
--- a/UnitySDK/Assets/FacebookSDK/Examples/GameGroups.unity
+++ /dev/null
@@ -1,212 +0,0 @@
-%YAML 1.1
-%TAG !u! tag:unity3d.com,2011:
---- !u!29 &1
-SceneSettings:
- m_ObjectHideFlags: 0
- m_PVSData:
- m_PVSObjectsArray: []
- m_PVSPortalsArray: []
- m_OcclusionBakeSettings:
- smallestOccluder: 5
- smallestHole: .25
- backfaceThreshold: 100
---- !u!104 &2
-RenderSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 6
- m_Fog: 0
- m_FogColor: {r: .5, g: .5, b: .5, a: 1}
- m_FogMode: 3
- m_FogDensity: .00999999978
- m_LinearFogStart: 0
- m_LinearFogEnd: 300
- m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
- m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
- m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
- m_AmbientIntensity: 1
- m_AmbientMode: 0
- m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
- m_HaloStrength: .5
- m_FlareStrength: 1
- m_FlareFadeSpeed: 3
- m_HaloTexture: {fileID: 0}
- m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
- m_DefaultReflectionMode: 0
- m_DefaultReflectionResolution: 128
- m_ReflectionBounces: 1
- m_ReflectionIntensity: 1
- m_CustomReflection: {fileID: 0}
- m_Sun: {fileID: 0}
---- !u!157 &4
-LightmapSettings:
- m_ObjectHideFlags: 0
- serializedVersion: 5
- m_GIWorkflowMode: 0
- m_LightmapsMode: 1
- m_GISettings:
- serializedVersion: 2
- m_BounceScale: 1
- m_IndirectOutputScale: 1
- m_AlbedoBoost: 1
- m_TemporalCoherenceThreshold: 1
- m_EnvironmentLightingMode: 0
- m_EnableBakedLightmaps: 1
- m_EnableRealtimeLightmaps: 1
- m_LightmapEditorSettings:
- serializedVersion: 3
- m_Resolution: 2
- m_BakeResolution: 40
- m_TextureWidth: 1024
- m_TextureHeight: 1024
- m_AOMaxDistance: 1
- m_Padding: 2
- m_CompAOExponent: 0
- m_LightmapParameters: {fileID: 0}
- m_TextureCompression: 1
- m_FinalGather: 0
- m_FinalGatherRayCount: 1024
- m_ReflectionCompression: 2
- m_LightmapSnapshot: {fileID: 0}
- m_RuntimeCPUUsage: 25
---- !u!196 &5
-NavMeshSettings:
- serializedVersion: 2
- m_ObjectHideFlags: 0
- m_BuildSettings:
- serializedVersion: 2
- agentRadius: .5
- agentHeight: 2
- agentSlope: 45
- agentClimb: .400000006
- ledgeDropHeight: 0
- maxJumpAcrossDistance: 0
- accuratePlacement: 0
- minRegionArea: 2
- cellSize: .166666672
- manualCellSize: 0
- m_NavMeshData: {fileID: 0}
---- !u!1 &17281797
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 17281802}
- - 20: {fileID: 17281801}
- - 92: {fileID: 17281800}
- - 124: {fileID: 17281799}
- - 81: {fileID: 17281798}
- m_Layer: 0
- m_Name: Main Camera
- m_TagString: MainCamera
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!81 &17281798
-AudioListener:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 17281797}
- m_Enabled: 1
---- !u!124 &17281799
-Behaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 17281797}
- m_Enabled: 1
---- !u!92 &17281800
-Behaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 17281797}
- m_Enabled: 1
---- !u!20 &17281801
-Camera:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 17281797}
- m_Enabled: 1
- serializedVersion: 2
- m_ClearFlags: 2
- m_BackGroundColor: {r: .23137255, g: .349019617, b: .596078455, a: 1}
- m_NormalizedViewPortRect:
- serializedVersion: 2
- x: 0
- y: 0
- width: 1
- height: 1
- near clip plane: .300000012
- far clip plane: 1000
- field of view: 60
- orthographic: 0
- orthographic size: 5
- m_Depth: -1
- m_CullingMask:
- serializedVersion: 2
- m_Bits: 4294967295
- m_RenderingPath: -1
- m_TargetTexture: {fileID: 0}
- m_TargetDisplay: 0
- m_TargetEye: 3
- m_HDR: 0
- m_OcclusionCulling: 1
- m_StereoConvergence: 10
- m_StereoSeparation: .0219999999
- m_StereoMirrorMode: 0
---- !u!4 &17281802
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 17281797}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: 0, y: 1, z: -10}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 1
---- !u!1 &1482271768
-GameObject:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- serializedVersion: 4
- m_Component:
- - 4: {fileID: 1482271770}
- - 114: {fileID: 1482271769}
- m_Layer: 0
- m_Name: GameGroups
- m_TagString: Untagged
- m_Icon: {fileID: 0}
- m_NavMeshLayer: 0
- m_StaticEditorFlags: 0
- m_IsActive: 1
---- !u!114 &1482271769
-MonoBehaviour:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1482271768}
- m_Enabled: 1
- m_EditorHideFlags: 0
- m_Script: {fileID: 11500000, guid: db1bc390317cb4b799efac28a460ea64, type: 3}
- m_Name:
- m_EditorClassIdentifier:
---- !u!4 &1482271770
-Transform:
- m_ObjectHideFlags: 0
- m_PrefabParentObject: {fileID: 0}
- m_PrefabInternal: {fileID: 0}
- m_GameObject: {fileID: 1482271768}
- m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
- m_LocalPosition: {x: -6.42004156, y: -8.74592876, z: -1.64325905}
- m_LocalScale: {x: 1, y: 1, z: 1}
- m_Children: []
- m_Father: {fileID: 0}
- m_RootOrder: 0
diff --git a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs b/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs
deleted file mode 100644
index 9d2b2857c..000000000
--- a/UnitySDK/Assets/FacebookSDK/Examples/Scripts/SubMenus/GameGroups.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
- *
- * You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
- * copy, modify, and distribute this software in source code or binary form for use
- * in connection with the web services and APIs provided by Facebook.
- *
- * As with any software that integrates with the Facebook platform, your use of
- * this software is subject to the Facebook Developer Principles and Policies
- * [http://developers.facebook.com/policy/]. This copyright notice shall be
- * included in all copies or substantial portions of the software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-namespace Facebook.Unity.Example
-{
- using System.Collections.Generic;
- using UnityEngine;
-
- internal class GameGroups : MenuBase
- {
- private string gamerGroupName = "Test group";
- private string gamerGroupDesc = "Test group for testing.";
- private string gamerGroupPrivacy = "closed";
- private string gamerGroupCurrentGroup = string.Empty;
-
- protected override void GetGui()
- {
- if (this.Button("Game Group Create - Closed"))
- {
- FB.GameGroupCreate(
- "Test game group",
- "Test description",
- "CLOSED",
- this.HandleResult);
- }
-
- if (this.Button("Game Group Create - Open"))
- {
- FB.GameGroupCreate(
- "Test game group",
- "Test description",
- "OPEN",
- this.HandleResult);
- }
-
- this.LabelAndTextField("Group Name", ref this.gamerGroupName);
- this.LabelAndTextField("Group Description", ref this.gamerGroupDesc);
- this.LabelAndTextField("Group Privacy", ref this.gamerGroupPrivacy);
-
- if (this.Button("Call Create Group Dialog"))
- {
- this.CallCreateGroupDialog();
- }
-
- this.LabelAndTextField("Group To Join", ref this.gamerGroupCurrentGroup);
- bool enabled = GUI.enabled;
- GUI.enabled = enabled && !string.IsNullOrEmpty(this.gamerGroupCurrentGroup);
- if (this.Button("Call Join Group Dialog"))
- {
- this.CallJoinGroupDialog();
- }
-
- GUI.enabled = enabled && FB.IsLoggedIn;
- if (this.Button("Get All App Managed Groups"))
- {
- this.CallFbGetAllOwnedGroups();
- }
-
- if (this.Button("Get Gamer Groups Logged in User Belongs to"))
- {
- this.CallFbGetUserGroups();
- }
-
- GUI.enabled = enabled && !string.IsNullOrEmpty(this.gamerGroupCurrentGroup);
- if (this.Button("Make Group Post As User"))
- {
- this.CallFbPostToGamerGroup();
- }
-
- GUI.enabled = enabled;
- }
-
- private void GroupCreateCB(IGroupCreateResult result)
- {
- this.HandleResult(result);
- if (result.GroupId != null)
- {
- this.gamerGroupCurrentGroup = result.GroupId;
- }
- }
-
- private void GetAllGroupsCB(IGraphResult result)
- {
- if (!string.IsNullOrEmpty(result.RawResult))
- {
- this.LastResponse = result.RawResult;
- var resultDictionary = result.ResultDictionary;
- if (resultDictionary.ContainsKey("data"))
- {
- var dataArray = (List