--- title: "Facebook連携" slug: "game-gamepot3-facebook-integration" updated: 2026-09-17T09:23:32Z published: 2026-09-17T09:23:32Z canonical: "guide.ncloud-docs.com/game-gamepot3-facebook-integration" --- > ## Documentation Index > Fetch the complete documentation index at: https://guide.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Facebook連携 Classic/VPC環境で利用できます。 Facebookログイン機能を使用するためのコンソールご利用ガイドです。 GAMEPOT連携以外のコンソールの使用方法は、次をご参照ください。 - [Meta for Developers](https://developers.facebook.com/docs/ja/facebook-login/) - Facebook Developer Platform: [https://developers.facebook.com](https://developers.facebook.com/) ## GAMEPOTダッシュボードに Facebookログイン認証情報を登録 Facebook認証キーをダッシュボードに登録する方法は次の通りです。 GAMEPOTダッシュボード > **プロジェクトの設定** > **認証** > **Facebook**メニューを順にクリックします。 ![gamepot-facebook0.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook0.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) ## Facebookログインの設定 Facebookログインを使用するには、GAMEPOTダッシュボード > **プロジェクトの設定** > **認証** > **Facebook**で全3つの項目に入力する必要があります。 ![gamepot-facebook11.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook11.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 1. Facebook App ID 2. Facebook Protocol Scheme 3. Facebook Client Token ### アプリ作成時の注意事項 1. **利用事例** > **アプリに必要な機能** > 「Facebookログインでユーザーに認証とデータをリクエストする」を選択し、アプリを作成 ![console_facebook03](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/console_facebook03.avif?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 2. アプリの作成を完了し、**Facebookログインボタン追加のカスタム設定**を選択 > 権限 > emailを「追加」 ![console_facebook04](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/console_facebook04.avif?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) ![console_facebook05](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/console_facebook05.avif?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) ### Facebook Login設定値の確認 1. **アプリの作成** > **アプリの設定** > **基本設定** > アプリ IDを GAMEPOTダッシュボード**「Facebook App ID」**に入力します。 ![gamepot-facebook04.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook04.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 2. 「Facebook App ID」に入力した内容の先頭に「fb」を付けて**「Facebook Protocol Scheme」**に入力します。 ![gamepot-facebook02.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook02.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 3. **アプリの設定** > **高度な設定** > クライアントトークンの内容を「**Facebook Client Token」**に入力します。 ![gamepot-facebook03.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook03.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 4. **アプリの設定** > **基本設定** >**プラットフォームを追加**をクリックし、**プラットフォーム**を選択します。 ![gamepot-facebook06.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook06.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) 5. Android情報を入力します。 ![gamepot-facebook08.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook08.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) - **キーハッシュ**: 使用中のキーハッシュを入力 - **パッケージ名**: Package nameを入力 - **クラス名**: Package nameの末尾に.MainActivityを追加して入力 6. iOSプラットフォームを追加し、情報を入力します。 - バンドル ID: App Store Connectと同じバンドル IDを入力 ![console_facebook06](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/console_facebook06.avif?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) ### Unityの場合、URL Schemesを入力(iOS) Unityを iOSで Facebookと連携するには、以下のように Schemesを Supported URL Schemesに入力します。 **[V3 Facebookログインのための iOS URL Schemesの取得先]** Facebook URL Schemesに入れる内容は次の方法で確認します。 - Facebookコンソール > **アプリの設定** > 基本設定で確認された **APP ID**に **fb**を付けた値 <例> APP ID: 1822222222222222の場合、URL Schemesは fb1822222222222222 ![gamepot-facebook12.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook12.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) Player Settings -> Other Settings -> **Supported URL Schemes**に、Facebookから発行された iOS URL Schemesを図のように入力します。 - sizeに「1」と入力すると Element 0欄ができので、入力できます。 ![gamepot-facebook13.png](https://cdn.document360.io/6998976f-9d95-4df8-b847-d375892b92c2/Images/Documentation/gamepot-facebook13.png?sv=2026-02-06&spr=https&st=2026-10-26T13%3A33%3A14Z&se=2026-10-26T14%3A33%3A14Z&sr=c&sp=r&sig=YaypYKmto6ezctoNCycFs3HY3nzpAy0nFVh6sTHoBu8%3D) ### AppDelegate.swiftメソッドコードの置き換え(iOS Native) 次のコードを使用して AppDelegate.swiftメソッドのコードを置き換えます。このコードは、アプリの起動時に SDKをリセットし、ログインや共有を行う際に SDKが Facebookネイティブアプリのログインと共有を処理するようにします。 ``` // AppDelegate.swift class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { ApplicationDelegate.shared.application( application, didFinishLaunchingWithOptions: launchOptions ) } func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { let sceneConfiguration = UISceneConfiguration(name: nil, sessionRole: connectingSceneSession.role) sceneConfiguration.delegateClass = SceneDelegate.self return sceneConfiguration } func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { ... // Facebookログインコールバック NotificationCenter.default.post(name: Notification.Name("FacebookLoginURL"), object: nil, userInfo: ["application": application, "url": url, "options": options, "type": "AppDelegate"]) ... return true } } class SceneDelegate: UIResponder, UIWindowSceneDelegate { func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { guard let url = URLContexts.first?.url else { return } ... // Facebookログインコールバック NotificationCenter.default.post(name: Notification.Name("FacebookLoginURL"), object: nil, userInfo: ["url": url, "type": "SceneDelegate"]) ... } ```