FacebookForDeveloperInUnity

https://developers.facebook.com/docs/unity/

Facebook SDK for Unity

Build cross-platform games with Facebook rapidly and easily

Download the SDK

Requires Unity 5.4 and up.

v7.15.1 See Change Log or Upgrade Guide.

 

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2178-6/851564_233808196785054_1852554575_n.png?_nc_ht=scontent-hkg3-1.xx&oh=35d6d4829457a1fe261e8ffa0105eac9&oe=5D6269C6

Get Started
Basic guide for Unity SDK

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2178-6/851582_532156920206214_2007427102_n.png?_nc_ht=scontent-hkg3-1.xx&oh=548135af31f23cd6e53b7820271c6b49&oe=5D91AB86

SDK Reference Docs
API Reference Docs

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2178-6/11414463_179427529057659_1992956732_n.png?_nc_ht=scontent-hkg3-1.xx&oh=fca9878ad582ec2df8475fc9707c3455&oe=5D962E39

View Source
View Source On Github

The Unity engine and ecosystem gives developers a world class technology platform from which they can build games that work seamlessly across multiple platforms quickly and effectively.

The Facebook SDK for Unity complements Unity Technologies' cross-platform support, providing a pure-Unity write-once, run-everywhere experience across the key gaming platforms of WebGL, Unity Web Player, Android and iOS. By maintaing a single codebase, you'll be able to deploy socially integrated gaming experiences to your players, regardless of platform.

The Facebook SDK for Unity provides a comprehensive collection of Facebook's social features, giving players of your Unity game the ability to share content with their friends and allowing you to create a personal, social gaming experience. In addition to providing a base set of features that are invoked consistently across platforms, the SDK also offers support for Facebook features that are unique to a particular platform (e.g. payments on the Web or App Invites on mobile). This will allow you to keep your code clean, using a simple, consistent model for everything your game can do on Facebook.

In Unity SDK

Login

People can easily sign in to your game with their Facebook Login.

Share

People can share content with their friends. They can also share Custom Stories with Open Graph.

Game Invites

People can send invites to friends from your game.

App Events

Understand people's actions in your game and measure the effectiveness of your Mobile App Ads.

Graph API

Get data in and out of Facebook's social graph. Query data, post stories, upload photos and do other tasks.

Ads

Drive installs with Mobile App Install Ads. Increase engagement with Mobile App Engagement Ads. Find your target audience with Custom Audiences for Mobile Apps. Monetize in your game with Audience Network.

App Links

Link to a context in your game.

Audience Network

Monetize your mobile property with Facebook ads.

Other Resources

Porting From Mobile to Canvas

Guide for mobile developers thinking about bringing their games to Facebook Canvas.

Getting Started Facebook for Unity

The Facebook SDK for Unity works with Unity 5.0 and above.

No matter what your target platform is, you'll need to start with creating a Facebook App ID for your game. The App ID is used to configure your Facebook SDK within Unity.

If you've never developed a game with Facebook before, or have never registered as a developer, follow the Developer Onboarding Guide first.

Create your app on Facebook

Step 1: If you do not already have a Facebook App ID for your app, you should create one:

Create a New App

 
Step 2: Once completed, you'll see your app's Basic Settings page. Here you can find your App ID, which is required within your Unity game's configuration, in order to integrate with Facebook.

Add the SDK to your Unity project

Step 1: Create a new project in the Unity Editor.

Step 2: Download the latest Facebook SDK for Unity from our Downloads page. Unzip this package after downloading. The code for this sample project will be included.

Step 3: In the Unity Editor, select from the menu 'Assets', 'Import Package' and then 'Custom Package…'. Navigate to the directory where you downloaded the Facebook for Unity SDK and select FacebookSDK.unitypackage.

Step 4: Import all of the assets in the package.

Step 5: Save your project. A post-build script will add a new menu item "Facebook" to the Unity Editor. If you don't see this, check your build for compilation errors and try building again.

Step 6: Select 'Edit Settings' from the 'Facebook' menu.

The inspector will show "FacebookSettings". In the input box under 'App Id:', paste in your Facebook App ID, found as described in the steps above.

Run the sample project

Step 1: In the Project panel, under 'Assets', there is a folder named 'FacebookSDK'. Inside this folder are all the files for the Facebook SDK for Unity. Open the folder titled 'Examples'. Double click on the 'MainMenu' scene to open the sample project menu.

Step 2: In the Unity Editor, select from the menu 'File' and then 'Build Settings'.

Select all the Unity Scenes in the 'Examples' folder from above and drag them over to the Build Settings Panel and drop them in the 'Scenes In Build' area. Drag the 'MainMenu' scene to be in order position 0 as below.

Step 3: Enter Play mode to run our example code for a simple demo of Facebook functionality.

Note: The Unity Editor environment offers limited functionality, and all the functions are stubbed. You may receive warnings and errors regarding the game's inability to reach Facebook and read assets from us; it's safe to ignore them.

Platform Specific Next Steps

After the basic configuration of the Unity SDK refer to the guides below to continue with platform specific configurations.

Select Your Platform:

iOS

Android

Facebook Canvas

Getting Started with the Facebook SDK for Unity on iOS

iOS 9 introduces some changes to the way that apps integrate with Facebook. A preview release of the Facebook SDK for Unity has been prepared for testing with iOS 9 and is available on our iOS 9 documentation.

Related Topics

Note: This guide is organized to follow after the shared setup steps for the Facebook SDK for Unity detailed in the Getting Stared guide. If you have not yet completed these steps please do so first.

This document provides an follow up step-by-step guide to get started with the Facebook SDK for Unity on iOS. We will build and deploy the sample Unity app bundled with the Unity SDK to allow you to get working on a Facebook integration quickly and effectively. If you're more comfortable working on Android or Web, you can switch to the Getting Started guides for those platforms.

Configuring your app for iOS

Step 1: Switch to the iOS Platform

Go to the Unity Editor. From the menu, choose 'File', 'Build Settings…' In the Build Settings dialog, under 'Platform', select 'iOS' as the target and click 'Switch Platform'. Ensure the sample project scenes have been added to the 'Scenes in Build' as previously described here.

 

Step 2: Set minimum iOS Version

The Facebook SDK for Unity only supports iOS version 8.0 and above. In order to prevent issues any issues on older devices, ensure the 'Target minimum iOS Version' is set to 8.0 or higher.

Step 3: Configure Bundle ID

With the Build Settings dialog still open, click 'Player Settings...' Then, in the Inspector pane go to 'Settings for iOS', then 'Other Settings'. Fill in the 'Bundle Identifier' field with a valid bundle identifier, usually formed using your company name and product name.

Whatever value you put there, you'll need to configure the same value in your app's Facebook settings. Go to the 'iOS' pane in the Basic tab of your app's 'Settings' page, and fill in the 'Bundle ID' field.

Step 4: Build

Now, back in the Unity Editor, click the 'Build' button. When prompted for an output directory name, call it unity_ios. Once Unity finishes building, open the file Unity-iPhone.xcodeproj in the directory that was created with Xcode.

You can hit the 'Play' button in Xcode to run the app in your default target (by default, the simulator), or use Xcode's usual functionality to run it on real iOS devices.

Now you're up and running on iOS. Congratulations!

Next steps

Feel free to explore the sample app to try out the various features of the SDK. Start by clicking the FB.Initbutton at the top of the sample, which will enable the other features of the sample. As a next step, modify the code included in the sample and add it to your game project; this will get your Facebook integration off to a flying start.

For more details on integrating the Facebook SDK into your Unity game, check out the SDK reference and SDK Examples. And if you'd like to see how easy it is to deploy to Facebook Canvas and Android, check out their respective Getting Started guides.

Getting Started with the Facebook SDK for Unity on Android

Related Topics

Note: This guide is organized to follow after the shared setup steps for the Facebook SDK for Unity detailed in the Getting Stared guide. If you have not yet completed these steps please do so first.

This document provides an follow up step-by-step guide to get started with the Facebook SDK for Unity on Android. We will build and deploy the sample Unity app bundled with the Unity SDK to allow you to get working on a Facebook integration quickly and effectively. If you're more comfortable working on iOS or Web, you can switch to the Getting Started guides for those platforms.

Configuring your app for Android

Step 1: Switch to the Android Platform

Go to the Unity Editor. From the menu, choose 'File', 'Build Settings…' In the Build Settings dialog, under 'Platform', select 'Android' as the target and click 'Switch Platform'. Ensure the sample project scenes have been added to the 'Scenes in Build' as previously described here.

Step 2: Set Android Miniimum API Level

Click on Player Settings and make sure the android Minimum API level is set to "Android 4.0.3 'Ice Cream Sandwich' (API level 15)" or higher.

Step 3: Configure Bundle ID and Key Hash

With the Build Settings dialog still open, click 'Player Settings...' Then, in the Inspector pane go to 'Settings for Android', then 'Other Settings'. Fill in the 'Bundle Identifier' field with a valid bundle identifier, usually formed using your company name and product name. Save your project.

Now select 'Edit Settings' from the 'Facebook' menu.

Find and note the value of the 'Debug Android Key Hash' in the 'Android Build Facebook Settings' panel. Also note the value of the 'Class Name'.

Now, let's add the Bundle ID, Key Hash, and Class Name to your app's Facebook settings. Go to the 'Android' pane in the Basic tab of your app's 'Settings' page, and fill in the 'Bundle ID', 'Key Hashes' , and 'Class Name' fields. Now save your changes.

Step 4: Build

Now, back in the Unity Editor, click the 'Build' button. When prompted for an output directory name, call it unity_android. You can choose to export an APK file directly, which you can install on a test device, or to export a project file to be opened in your Android IDE.

Now you're up and running on Android. Congratulations!

Next steps

Feel free to explore the sample app to try out the various features of the SDK. Start by clicking the FB.Initbutton at the top of the sample, which will enable the other features of the sample. As a next step, modify the code included in the sample and add it to your game project; this will get your Facebook integration off to a flying start.

For more details on integrating the Facebook SDK into your Unity game, check out the SDK reference and SDK Examples. And if you'd like to see how easy it is to deploy to Facebook Canvas and iOS, check out their respective Getting Started guides.

Getting Started with the Facebook SDK for Unity on Facebook Web Games

Related Topics

Note: This guide is organized to follow after the shared setup steps for the Facebook SDK for Unity detailed in the Getting Stared guide. If you have not yet completed these steps please do so first.

This document provides a follow up step-by-step guide to get started with the Facebook SDK for Unity on Facebook Web Games. We will build and deploy the sample Unity app bundled with the Unity SDK to allow you to get working on a Facebook integration quickly and effectively. If you're more comfortable working on iOS or Android, you can switch to the Getting Started guides for those platforms.

WebGL vs Unity Web Player

In Unity 5.0, the WebGL deployment target was introduced as a new way to build Web games. Unlike deploying with the Unity Web Player, WebGL has no dependency on a browser plug-in; games will simply run in any modern browser.

An additional motivation for deploying with WebGL is to support browsers where the Unity Web Player is no longer a viable solution. One such browser is Google Chrome, which ended general support for Netscape Plug-in API (NPAPI). Since Unity Web Player is an NPAPI plug-in, these changes make the Unity Web Player unusable in Chrome.

Configure your app for Facebook Web Games

Step 1: Switch to a Web Platform

Go to the Unity Editor. From the menu, choose 'File', 'Build Settings…' In the Build Settings dialog, under 'Platform', select 'WebGL' or 'Web Player' as the target and click 'Switch Platform'. Ensure the sample project scenes have been added to the 'Scenes in Build' as previously described here.

Note: Select 'WebGL' to build with HTML5 technologies or select 'Web Player' to build for the Unity Web Player to target older browsers.

Step 2: Build

With the Build Settings dialog open, click the 'Build' button. When prompted for an output directory name, call it web.

See the Building for Web section below for best practices.

Step 3: Deploy the game

Upload the files from the output directory to an SSL/TLS-capable Web server. The game object must be served over HTTPS. During development you will find it easier to serve your game file from a local web server supporting HTTPS. Plenty of solutions exist on the web to help you get started, most of which are free and open source. Check out XAMPP as a starting point.

Step 4: Configure Facebook Web Games Settings

Navigate to your app's Facebook settings. Go to the 'Facebook Web Games' pane in the Basic tab of your app's 'Settings' page and fill in the 'Facebook Web Games URL (https)' field with the URL where you are serving your game. Now save your changes.

When using version 7 or later of the Unity SDK, ensure you leave both 'Legacy Unity Integration' and 'Unity Web Player Install Flow' un-checked. These are legacy settings for usage with older versions of the Unity SDK.

Step 5: Run

Navigate to 'https://apps.facebook.com/[your_app_id]'. You should now be able to see a running example of the game.

Congratulations, you have setup a basic Unity sample and have it running successfully on Facebook.com!

Building for Web

Building with WebGL requires a special consideration. Take note of the steps outlined below:

  1. Read through the Unity documentation on WebGL before you begin building to the WebGL deployment target. There are a number of limitations in features and in browser compatibility to be aware of such as no support for threading or sockets.
  2. Use the latest Unity 5 Release. There are numerous improvements for WebGL in each Unity 5 release and you should not be building without them.
  3. Refer to the Unity documentation on building a WebGL project for information about optimizing build size and performance.
  4. Learn from the community. Read blogs from developers who detail their transition to WebGL, like Jelly Button and Leviathan Games.
  5. Check out the webinar recording embedded below for details on common challenges with WebGL deployment and best practices for web games.

Hybrid Deployment

Due to the varied levels of support for WebGL across browers it can be desirable to maintain both a WebGL and Web Player deployment of your game.

In order to accomplish this you will need to build and host both versions of your game. Instead of pointing the Facebook Web Games URL (https) setting to one of the builds, create a new Pre-Loader that will decide which build to redirect to.

// Simple Pre-Loader Example in Javascript
// Redirects Google Chrome v42 User Agent to WebGL
// Redirects all else to Web Player
<!DOCTYPE html>
<html>
<body>
<script>
var chromeVersion = window.navigator.userAgent.match(/Chrome\/(\d+)\./);
if (chromeVersion &amp;&amp; chromeVersion[1]) {
  if (parseInt(chromeVersion[1], 10) >= 42) {
    window.location = "/unity/webgl";
  }
}
window.location = "/webplayer/webplayer.html";
</script>
</body>
</html>

There are more advanced ways to detect support of the Unity Web Player plugin, but we will not detail those here. Consider starting with UnityObject2.js

WebGL Webinar

Next steps

Feel free to explore the sample app to try out the various features of the SDK. Start by clicking the FB.Initbutton at the top of the sample, which will enable the other features of the sample. As a next step, modify the code included in the sample and add it to your game project; this will get your Facebook integration off to a flying start.

For more details on integrating the Facebook SDK into your Unity game, check out the SDK reference and SDK Examples. And if you'd like to see how easy it is to deploy to iOS and Android, check out their respective Getting Started guides.

Facebook SDK for Unity - Examples

Read our Getting Started guide to learn how to load and configure the Facebook SDK for Unity. Next try these examples using the SDK:

Initialize the SDK

Use FB.Init to initialize the Facebook SDK for Unity. Consider using the Awake function from Unity's Monobehavior class as a starting place. In the callback from FB.Init, check FB.IsInitialized to verify FB.Init succeeded and if so, make a call to FB.ActivateApp to signal an app activation.

// Include Facebook namespace
using Facebook.Unity;
 
// Awake function from Unity's MonoBehavior
void Awake ()
{
    if (!FB.IsInitialized) {
        // Initialize the Facebook SDK
        FB.Init(InitCallback, OnHideUnity);
    } else {
        // Already initialized, signal an app activation App Event
        FB.ActivateApp();
    }
}
 
private void InitCallback ()
{
    if (FB.IsInitialized) {
        // Signal an app activation App Event
        FB.ActivateApp();
        // Continue with Facebook SDK
        // ...
    } else {
        Debug.Log("Failed to Initialize the Facebook SDK");
    }
}
 
private void OnHideUnity (bool isGameShown)
{
    if (!isGameShown) {
        // Pause the game - we will need to hide
        Time.timeScale = 0;
    } else {
        // Resume the game - we're getting focus again
        Time.timeScale = 1;
    }
}

Facebook Login

Use FB.LogInWithReadPermissions to prompt the user to login with Facebook, requesting the public_profile and email permissions. In the callback, check FB.IsLoggedIn to see if the login succeeded and if so, print information about the logged in session from the current AccessToken.

var perms = new List<string>(){"public_profile", "email"};
FB.LogInWithReadPermissions(perms, AuthCallback);
 
private void AuthCallback (ILoginResult result) {
    if (FB.IsLoggedIn) {
        // AccessToken class will have session details
        var aToken = Facebook.Unity.AccessToken.CurrentAccessToken;
        // Print current access token's User ID
        Debug.Log(aToken.UserId);
        // Print current access token's granted permissions
        foreach (string perm in aToken.Permissions) {
            Debug.Log(perm);
        }
    } else {
        Debug.Log("User cancelled login");
    }
}

Share to Facebook

Use FB.ShareLink to give the user an opportunity to share content to Facebook.

FB.ShareLink(
    new Uri("https://developers.facebook.com/"),
    callback: ShareCallback
);
 
private void ShareCallback (IShareResult result) {
    if (result.Cancelled || !String.IsNullOrEmpty(result.Error)) {
        Debug.Log("ShareLink Error: "+result.Error);
    } else if (!String.IsNullOrEmpty(result.PostId)) {
        // Print post identifier of the shared content
        Debug.Log(result.PostId);
    } else {
        // Share succeeded without postID
        Debug.Log("ShareLink success!");
    }
}

Log an App Event

Use FB.LogAppEvent to log the completion of a step in your tutorial.

var tutParams = new Dictionary<string, object>();
tutParams[AppEventParameterName.ContentID] = "tutorial_step_1";
tutParams[AppEventParameterName.Description] = "First step in the tutorial, clicking the first button!";
tutParams[AppEventParameterName.Success] = "1";
 
FB.LogAppEvent (
    AppEventName.CompletedTutorial,
    parameters: tutParams
);

View these events reported in aggregate with valuable demographic info about your players on Facebook Analytics for Apps.

Facebook SDK for Unity Reference

Related Topics

This document provides the API details for the Facebook SDK for Unity.

The architecture follows, as much as possible within the constraints of the supported platforms, the design of the Javascript SDK. All functions implementing I/O operations are asynchronous and take a delegate as an argument which will be called with their output once it is ready.

Most data exchanged over the network is marshalled as strings containing JSON, and a utility class, Json, is provided to help manage that data within Unity.

Note: The Facebook SDK for Unity works with Unity 5.0 and above.

Core Methods

Name

Description

FB.Init

Initialize the SDK, this is required before doing anything else

FB.API

Make an API call to the Graph API

FB.ShareLink

Trigger a Share dialog for one-to-many sharing

FB.FeedShare

Trigger the legacy Feed sharing dialog, only use if you need legacy parameters

FB.AppRequest

Trigger a Game Request dialog for one-to-one sharing

FB.GetAppLink

Get the URL with which the app was invoked

Facebook Login

Name

Description

FB.LogInWithReadPermissions

Prompt a user to authorize your app with requested read permissions, or to grant additional read permissions

FB.LogInWithPublishPermissions

Prompt a user to authorize your app with publish permissions, or to grant additional permissions

FB.LogOut

Log a user entirely out of Facebook

Session Properties

Name

Description

AccessToken

The access token granted to your application by the current user

FB.IsInitialized

Check whether the SDK has been initialized

FB.IsLoggedIn

Check whether a user is currently logged in and has authorized your app

FB.GraphApiVersion

Check whether a user is currently logged in and has authorized your app

App Events

Name

Description

FB.ActivateApp

Signal an app launch or resume, for integrating with App Ads and Facebook Analytics for Apps

FB.LogAppEvent

Publish an App Event, for deeper integration with App Ads and Facebook Analytics for Apps

FB.LogPurchase

Convience method for publishing purchase events, for deeper integration with App Ads and Facebook Analytics for Apps

Mobile-only

Name

Description

FB.Mobile.RefreshCurrentAccessToken

Updates the current access token with up-to-date permissions, and extends the expiration date if possible

FB.Mobile.AppInvite

Open an App Invite dialog, giving users the ability to send their friends a personal invite to your app

FB.Mobile.FetchDeferredAppLinkData

Fetch deferred applink data from App Ads or invites

FB.Mobile.ShareDialogMode

Set the preferred dialog type when using FB.ShareLink

Canvas-only Methods

Name

Description

FB.Canvas.Pay

Prompt the user to make a payment using Facebook Payments

Auxiliary Methods

Name

Description

FB.GameGroupCreate

Prompt user to create a new Game Group

FB.GameGroupJoin

Prompt user to join a Game Group

Other References

SDK Examples

Examples for the several common scenarios with the Facebook SDK for Unity

Using JSON with Unity

JSON is widely-used for data interchange; we can help you use it with Unity

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

https://developers.facebook.com/docs/apps#register

应用开发

这些文档说明了如何注册、配置和开发您的应用,以便您成功使用我们的产品、API SDK

一般开发周期包括以下步骤:

  1. 注册您的应用
  2. 选择情景并添加产品
  3. 添加身份
  4. 使用开发模式进行测试
  5. 提交以供应用审核
  6. 切换为已发布模式

每当添加新权限、功能或产品,或升级到新版 SDK API 时,您都可以重复开发模式测试应用审核步骤。

注册

为了让您的应用能够访问我们的任何产品或 API,您必须首先将 Facebook 帐户转换为开发者帐户,并使用应用面板注册您的应用。您可以在 developers.facebook.com 完成此操作。注册程序将为您创建应用编号,以便我们了解您的身份,帮助我们区分您的应用与其他应用,并让您在设置特定产品或请求访问敏感 API 时,可以提供我们所需的任何其他资料。

完成注册程序后,请点击左侧的设置链接,然后提供有关您应用的任何其他已有信息。大多数字段均清晰易懂,但下文将提供有关其中一些字段的更多信息。

应用编号

当您注册时,我们将为您的应用生成独特的应用编号。您会经常用到这个编号,因为在向我们的 API 发出任何调用时都必须加入此编号。我们的所有 SDK 都可让您轻松进行此项设置,使系统在您发出任何 API 调用时自动加入此编号。

平台

此字段可让我们了解您的用户如何访问您的应用,例如使用移动设备或网站。如此一来,之后我们可以向您显示特定平台的产品和功能。

隐私政策和服务条款

这些字段应该是适用于您应用用户的隐私政策和服务条款的网址。假如您是此应用的用户,并想了解应用开发者保护隐私的方法以及您需要同意的条款,您便需要了解隐私政策和服务条款。您可在此处输入相应的网址。如果您在使用需要接受应用审核的任何产品、登录权限或功能,我们将审核这些网址包含的内容。

情景和产品

完成应用注册后,您可以选择一个或多个情景。选择一个情景将会添加与该情景相关的产品。完成情景验证后,左侧将显示已添加的产品,右侧将显示该产品的文档。

您也可跳过情景部分并添加其他产品。

身份

注册应用后,您可以向拥有开发者帐户的任何用户分配身份,以帮助您开发内容。您可以通过身份控制应用及其设置的访问权限。当您向拥有开发者帐户的用户分配身份时,此用户将收到邀请,并可选择接受或拒绝邀请。如要配置身份,请选择左侧导航栏中的身份。有关每个身份的更多详细信息,请参阅应用安全

权限

管理员

开发者

测试者

成效分析用户

修改应用设置

   

重置应用密钥

     

删除应用

     

修改应用身份

     

测试登录权限、功能和产品

 

创建测试版应用、用户和主页

   

查看应用成效分析

 

开发模式

当您首次注册应用时,系统会将其设置为开发模式。用户必须拥有应用身份,才可以访问处于开发模式的应用。您应该在应用处于开发模式时,完成所有开发和测试工作。

处于开发模式时,您的应用:

  • 可以使用所有权限、功能和产品
  • 只能由拥有应用身份的用户安装或使用
  • 只能由拥有应用身份的用户授予权限
  • 只能访问来自拥有应用身份的用户的用户、主页或小组数据,或来自测试用户测试主页的数据。
  • 不会在应用中心显示

用户必须拥有应用身份,才能查看开发模式下生成的任何数据。不过,当您将应用切换为已发布模式后,任何能够使用您应用的用户都可以看到这些数据。

由于处于开发模式的应用可以使用所有登录权限、功能和产品,因此您应该在应用处于开发模式时,截取所有相关截屏视频,以供应用审核。请注意,测试版应用始终处于开发模式,因此如果您的应用处于已发布模式,而且您需要截取新功能的截屏视频,则您无需切换回开发模式。相反,您可以使用已发布应用创建测试版应用,并使用测试版应用来截取截屏视频,然后在所提交的详情中加入测试版应用编号。

应用审核

在将应用切换为已发布模式之前,您可能需要完成应用审核。此流程可让我们验证您的身份,以及您使用应用所访问数据的方式。

已发布模式

在测试应用以及完成应用审核(如有需要)之后,您可以切换为已发布模式。将您的应用切换为已发布模式后,系统不会让此应用在 Facebook.com 或任何搜索引擎自动可供查找。如果您希望用户能够查找您的应用,则必须自行营销,或手动将其添加到应用中心。

处于已发布模式时,您的应用:

  • 可由有权访问的任何用户安装和使用
  • 可访问已安装它并向它授予必要权限的任何用户的数据
  • 无法在未经批准的情况下,获取任何登录权限或访问任何功能或产品

由于您无法向已发布应用授予未经批准的登录权限,一旦发布应用,您将无法进行测试或截取有关新功能的任何截屏视频。虽然您可以将应用切换回开发模式,但我们建议您使用已发布应用创建测试版应用,并使用测试版应用测试和截取截屏视频。

https://developers.facebook.com/apps/1296235693876679/add/

 

https://blog.jellybtn.com/2015/07/26/porting-your-game-to-webgl-chapter-1/

 

Developer Settings

After you sign up for a developer account, go to the Developer Settings section of the app dashboard to edit your account details. Change your email, notifications, sample app, and documentation settings.

In the upper right corner of your dashboard, hover over the profile image. Select Developer Settings from the drop-down menu.

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/49069146_484923542034522_1321939132108242944_n.png?_nc_cat=100&_nc_ht=scontent-hkg3-1.xx&oh=d84473f063dfa5238681158b7696837f&oe=5D5DF0EA

Contact Settings

Click the Contact tab to change your email, edit notification settings for Urgent updatesConversationsProduct updates, and Blog & Documentation updates, or delete your Facebook developer account.

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/49024171_281379935905669_4067437434944618496_n.png?_nc_cat=101&_nc_ht=scontent-hkg3-1.xx&oh=bf64106fee2282ef7555c5baad43c28b&oe=5D62661E

Notification Settings

You can click All OnAll Off, or customize by selecting individual items and the delivery method for each. To customize, click the notification type, Urgent, Conversations, Products, or Blogs & Docs, then select the the individual items dropdown menu to the right.

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/48933335_1143252149166873_3402832537704202240_n.png?_nc_cat=110&_nc_ht=scontent-hkg3-1.xx&oh=11f4a2df33dc9097e59d749a7300e15f&oe=5D518A2C

Urgent Updates

Get urgent updates that may require an action from you to prevent your app from breaking.

Urgent Notification

Description

Available Delivery Methods

API Rate Limiting

Alerts about nearing and hitting the rate limit for API requests.

Email, On Facebook

App Status

Alerts about changes in app status including when the app is made public or deleted.

Email, On Facebook

Moratoriums & Restrictions

Alerts about moratoriums/restrictions placed on your app.

Email, On Facebook

Platform Status Updates That May Affect Your Apps

Platform status updates that directly affect any of your apps.

Email

Privacy Policy

Updates on the status of your app's privacy policy url.

Email, On Facebook

Webhooks

Alerts about your existing Webhooks subscriptions.

Email, On Facebook

Version Deprecation

Alerts about a version upgrade affecting your app.

Email, On Facebook

Conversations

Get direct responses from Facebook about the status of your app.

Conversations Notifications

Description

Available Delivery Methods

App Review

Alerts about app review status updates.

Email, On Facebook

Appeals

Updates on the status of your appeals.

Email, On Facebook

Bugs

Alerts about reported bugs for your app.

Email, On Facebook, Messenger

Developer Circles

Updates on the status of the Developer Circles program.

Email

Direct Support Questions

Alerts about direct support questions.

Email, On Facebook

FBStart

Alerts about the FbStart program.

Email, On Facebook

Product updates

Get updates of Facebook platform products you use.

Product Notifications

Description

Available Delivery Methods

Analytics

Get data and trends for your apps.

Email

Audience Network

Alerts about your ad placements with Audience Network.

Email, On Facebook

Gameroom Native

Updates on Gameroom Native changes.

Email, On Facebook

Login & API Errors

Alerts about when your app throws errors during login or for other API calls.

Email, On Facebook

Marketing API

Alerts about your app's integration with the Marketing API.

Email, On Facebook

Open Graph

Open Graph approval status updates.

Email, On Facebook

Payments

Alerts about canvas payment and payout updates.

Email, On Facebook

Platform Announcements

New products, events, surveys and more.

Email

Blog & Documentation updates

Get updates of blog posts and documentation you're subscribed to.

Blogs & Docs Notifications

Description

Available Delivery Methods

Developer Blog Digests

Get the Developer Blog Digest.

Email

Developer Blog Posts

Get notified about every new Developer blog post.

Email

Instant Articles Developer Blog Posts

Get notified about every new Instant Articles blog post.

Email

Marketing API Blog Digests

Get the Marketing API Blog Digest.

Email

Marketing API Blog Posts

Get notified about every new Marketing API blog post.

Email

Marketing API Breaking Changes

Get notified about breaking changes to the Marketing API.

Email

Delete Your Developer Account

Deleting your developer account will delete all your apps. If you are the only admin of an app, all app information will be lost. Recreating your account will not return access to your apps.

Sample App Settings

Click on the Sample App tab to add the Android Key Hash of your sample app.

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/48982785_957289077809991_5490071542731636736_n.png?_nc_cat=104&_nc_ht=scontent-hkg3-1.xx&oh=62d4d848d186f70f164267ddb493a004&oe=5D99F957

Documentation Settings

Click on the Documentation tab to select a default programming language from the dropdown menu that will be used in the developer documentation code examples.

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/48999027_740809509631807_1549574400251002880_n.png?_nc_cat=104&_nc_ht=scontent-hkg3-1.xx&oh=131db9a7f9a1090a307622b4f9dc96f2&oe=5D94BF05

应用审核

在您将应用切换为已发布模式前,我们可能需要确保您会以获批准的方式使用我们的产品和数据。为了实现这一目标,我们会要求许多应用接受应用审核。

一般来说,审核流程包括指明应用请求用户提供的数据类型,以及说明使用相关数据的方式。根据您提交的应用,我们可能会跟进并要求您完成额外步骤。

以下是所有可能的步骤:

您可能需要完成以上几个步骤。具体的步骤组合取决于您要实现的产品和功能、访问的数据类型,以及您使用这些数据的方式。

哪些人需要接受应用审核?

要确定您的应用是否需要接受审核,最简单的方法是参考您要实现的每个产品的产品文档。每个文档集均应包含要求或应用审核部分,其中列出您需要完成的应用审核步骤,以及任何不属于应用审核的特殊要求。

提交时间

您可以随时开始审核流程,并且可以在开始审核前编辑您的提交内容,但我们建议您在使用开发模式全面测试应用并且准备好发布后,再开始提交此应用。如果您的应用已通过应用审核并获准用于特定产品,而您更改了产品设置或添加了新的产品、权限或功能,我们可能会要求您再次完成审核流程。

请注意,如果您的应用处于已发布模式,并且您想要添加新的权限、功能或产品,请遵循已发布应用的应用审核准则,这将有助您提交应用。

提交方式

如要开始一般应用审核流程,您需要登录应用的应用面板,选择您想要审核的应用,然后在左侧导航菜单中找到应用审核链接。

点击链接后,您便会看到开始流程的界面。请记住,某些产品需要接受产品审核,您可以在面板上每种产品的功能选项中访问相关信息并提交。您可以同时提交一般应用审核和特定产品审核。

审核需要多长时间?

我们一般需要不到一周的时间处理您提交的应用,通常只需要 2 3 天,但遇繁忙期时可能需要更长时间。请注意,由于近期审核流程有所变化,加上提交量较大,您所提交的应用可能需要几周时间才能完成审核流程。

其他验证

在您提交应用以供审核后,我们可能会请您验证您的公司个人身份信息。为了执行此操作,我们会向您的应用面板收件箱发送一条提醒消息。此消息会包含用于开始验证流程的链接。

提交示例

为了让您更好地了解整个提交流程,我们为常用的产品和 API 创建了一组提交示例

应用审核

这是很多应用在发布前必须完成的一般审核流程。您可以前往应用面板,在应用审核部分开始此流程。系统会提示您在登录权限和功能列表中选择相关选项,并描述和展示(如有可能)您将如何使用这些数据。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/53591368_371977463396094_1195989662829641728_n.png?_nc_cat=102&_nc_ht=scontent-hkg3-1.xx&oh=b8087bd4561e7f054e8f639c3e48aa03&oe=5D5EC8DF

我的权限和功能

每当您开始新的应用审核提交流程时,都会看到已获批准的权限和功能。此处会显示所有新获准的权限和功能。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/53561495_791366554558467_3351996617593978880_n.png?_nc_cat=110&_nc_ht=scontent-hkg3-1.xx&oh=0f3b7e74d8c0d823ec2163b53d2ff59b&oe=5D56CD3A

defaultemail  pages_show_list 权限都已经过预先批准。只有这些权限不需要接受应用审核。应用审核提交界面中的所有其他登录权限和功能都需要接受应用审核。

请注意,您可以通过产品审核请求某些特定于产品的权限,这类权限不会在此显示。

登录权限和功能

登录权限允许应用用户授权应用访问特定类型的数据,因此您应该只选择与应用所需数据类型对应的权限。例如,如果您的应用允许用户查看他们上传到自己时间线的视频,则您应在所提交的应用中加入 user_videos 权限。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/53624157_341507573148159_8525899730583027712_n.png?_nc_cat=100&_nc_ht=scontent-hkg3-1.xx&oh=f9e9e486c8c751be3b079bbf4d0fe463&oe=5D9D184C

界面中显示的所有登录权限都需要接受审核,并且您必须提供详细信息截屏视频,以说明您将如何使用用户授权访问的数据。

所有功能都需要接受审核。各项功能均对应特定的功能、产品或 API。当您选择一项功能时,它会列出任何可能需要包含在所提交应用中的登录权限。我们也建议您阅读每种产品的文档集,以获取详细的应用审核说明。

详情

在您提交应用以供审核之前,系统会要求您描述将如何使用每项权限或功能提供的数据。如果您设置测试用户来测试这些权限或功能,建议您在提交时添加它们的登录凭证。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/53556782_815125158828009_3544649016333565952_n.png?_nc_cat=108&_nc_ht=scontent-hkg3-1.xx&oh=850268488287a65927444e0408ed7171&oe=5D9D96B4

请详细解释您的应用将如何使用每项权限。请先尝试回答以下问题:

  • 授予这项权限将如何帮助用户使用您的智能助手?
  • 您为什么需要这项权限?
  • 您的智能助手将如何使用其从 Facebook 接收的数据?
  • 您的智能助手如何使用这项权限?
  • 为什么智能助手在缺乏此项权限时,功能性会减弱?

请详尽说明。

截屏视频

某些权限和功能要求使用截屏视频来说明您的应用将如何使用这些数据(如果应用没有 UI,则需说明最终将如何使用这些数据)。我们建议您使用专门的录屏软件录制截屏视频。请避免使用移动设备的相机拍摄展示应用数据使用流程的另一台设备的屏幕。

要显示数据使用情况,最简单的方法是将您的应用设置为开发模式,并从您自己的用户帐户中提取数据,或从任何拥有应用管理员或开发者身份的用户提取数据。

如果您的应用没有用户界面,并会直接与我们的 API 互动,请参阅我们的服务器到服务器应用文档,以获取有关如何提供详情的指引。

参与条款

当您提交应用以供审核时,系统会要求您同意我们的参与条款,其中规定了基本的可接受用途。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/36513660_269077033837403_4269177507741171712_n.png?_nc_cat=110&_nc_ht=scontent-hkg3-1.xx&oh=11d856a22cc113be30bfb18c4af05d85&oe=5D9DCF7C

产品审核

某些产品(例如 Messenger  Instagram)会要求您的应用完成专门的审核步骤。当您添加任何此类产品时,产品功能选项会显示于应用的面板中,并且包含其中列出任何专门权限和说明的应用审核部分。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/53528719_522466378278849_6194455495059701760_n.png?_nc_cat=101&_nc_ht=scontent-hkg3-1.xx&oh=8d378861a8359bd4c016f45d875afdf6&oe=5D908B5A

产品审核与一般的应用审核无关,因此,在提交项目进行产品审核时,您必须在各个产品的功能选项内开始提交。

公司验证

我们通过公司验证流程来验证您的企业法人身份信息,当您的应用要访问敏感数据时,我们会要求您进行此项验证。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/59486425_424729171426832_5714335970216640512_n.png?_nc_cat=103&_nc_ht=scontent-hkg3-1.xx&oh=107e2aac7d38a1cf9b58af036561f914&oe=5D994DC1

如果您是公司的开发者,并且您的应用获准使用与下方产品相关的权限和功能,我们将向您的应用面板收件箱发送一条提醒消息,要求您完成公司验证。在完成公司验证流程前,您的应用将无法在已发布模式下使用与下方产品相关的任何已批准的权限和功能

公司验证适用于您的开发者帐户,因此它会影响您的全部应用。在您将需要接受公司验证的应用提交审核后,我们会将您的全部现有应用和任何新应用标记为需要接受公司验证,并且这些应用会沿用您的验证状态。这可能会对较早开发的应用产生不利影响,这些应用已获准使用权限,但相关权限现在需要接受公司验证。如果应用可以使用某项权限,但在获得批准时还不需要接受公司验证,而现在公司未通过公司验证,则该应用在通过之前将无法再使用这些权限。

公司验证流程

您可以关注开发者提醒中的链接,以开始公司验证流程。我们会要求您将应用连接至 Facebook 商务管理平台帐户,从而开始验证流程。如果我们能通过可信的第三方数据源找到您的公司详情,我们会要求您通过电子邮件或电话验证您与公司的关系。如果我们无法找到您的公司详情,您可能需要提交其他文件才能完成公司验证流程。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/59448334_634513946962267_8746115605930704896_n.png?_nc_cat=106&_nc_ht=scontent-hkg3-1.xx&oh=ca833cd7b7b17fd1c9fb40a8c0bfc234&oe=5D8E438C

如果您已提交文件,但仍存在验证问题,则您可能需要提交其他文件。如果您不能在 1 周内提供此额外信息,则您将需要重新开始此流程。

如需了解公司验证流程和故障排除步骤的更多信息,请参阅我们的商务管理平台帮助文档

个人验证

如果您不是公司的开发者,并且您的应用获准使用与下列产品相关的权限和功能,我们将向您的应用面板收件箱发送一条提醒消息,您可以选择完成个人验证,而非公司验证。我们通过个人验证流程来验证您的个人(与公司相对)身份信息,如果您的应用要访问敏感数据,我们会要求您进行此项验证。

您可以通过关注开发者提醒中的链接,或前往 developers.facebook.com 并导航至我的应用 > 开发者设置来开始个人验证流程。

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/58687871_1992017684258240_3962567884198117376_n.png?_nc_cat=104&_nc_ht=scontent-hkg3-1.xx&oh=336a55841fcb953824d9994715a06e23&oe=5D9D210D

请在该处点击个人验证

https://scontent-hkg3-1.xx.fbcdn.net/v/t39.2365-6/58747572_2031879223780068_2979320089116934144_n.png?_nc_cat=102&_nc_ht=scontent-hkg3-1.xx&oh=9fd975ca1f8e2fe772a865391b54197f&oe=5D5F7713

在完成个人验证流程前,您的应用将无法在已发布模式下使用与下方产品相关的任何已批准的权限和功能。

限制

  • 如果您已经进入公司验证流程,则您无法完成个人验证。
  • 如果您是公司的开发者,但您的应用将供其他公司使用,则您无法完成个人验证。

此外,如果您已作为个人完成身份验证,则您在使用下列产品时将受到功能限制:

请注意,在您提交资料进行个人验证后,即使您提交的资料遭到拒绝,这些限制也会立即生效

个人验证流程

如果选择完成个人验证,您需要:

补充条款

如果我们需要您同意补充条款,则会请您提供公司签名人员的邮箱。我们会通过邮件向签名人员发送一个链接,该链接指向的网站会显示我们的扩展平台产品补充条款。签名人员可以使用该网站同意相关条款,之后我们会通过邮件向签名人员发送协议副本。

技术提供商修正条款

如果您的公司会使用我们的 API 和数据为其他公司提供服务,则在公司验证期间,您需要提供技术提供商签名人员的邮箱。我们会通过邮件向签名人员发送一个链接,该链接指向我们的技术提供商修正条款,其中包含有关数据使用政策的加重条款。签名人员必须签署此修正条款,并可使用 Adobe Sign 签署。

终端公司验证

如果您使用我们的 API 或数据向其他公司提供服务,我们会要求您告知客户是谁。我们会尽快宣布相关解决方案,以帮助您解决这一问题。如果您的客户通过您的应用访问大量用户数据,则您的客户可能需要满足我们的额外要求。

提交技巧

准则

请参阅我们的提交准则,了解获得批准的技巧和常见被拒情况。

审核示例

查看我们的 Facebook 登录产品文档,以了解关于应用请求访问可审核权限的应用审核提交示例

已发布应用的应用审核

处于开发模式时,应用的所有登录权限、功能和特定产品功能都会自动获得批准。这让您可以测试新功能和创建截屏视频,您可以将截屏视频添加到最终应用审核提交材料中。

然而,在您将应用切换为已发布模式后,您的应用只能使用已获批准的权限和功能。这意味着您将不能测试或创建展示任何未批准权限或功能用法的截屏视频。

虽然您可以通过将应用切换回开发模式来解决此问题,但我们建议您创建一个测试版应用,并用它来测试和捕捉任何新权限和新功能的截屏视频。在您重新提交已发布应用以供审核时,将该测试版应用的编号添加到任何权限或功能的用法详情中。

 

 

发布了16 篇原创文章 · 获赞 44 · 访问量 38万+

猜你喜欢

转载自blog.csdn.net/Game_jqd/article/details/90648409
今日推荐