Facebook API
備考
Facebookにログインしてあなたの写真を3D彫刻で表示しましょう。
PlayCanvasは、WebGLベースのFacebookゲームやアプリケーションを構築するための理想的なパートナーです。Facebookは、ゲームに対して大規模なオーディエンスを見つけるのに最適な場所であり、PlayCanvasはWeb向けに最適化された高速でパフォーマンスの良いゲームを作成することができます。
このチュートリアルでは、Facebook APIをPlayCanvasアプリケーションに統合する方法を紹介します。Facebook APIにアクセスできるようになると、さまざまな可能性があります。例えば、友達とゲームを共有したり、Facebookにストーリーを投稿したりなどです。チュートリアルプロジェクトをご覧ください。
Facebookプラグイン
GitHub上で利用可能なFacebookの統合をサポートするプラグインがあります。これにより、FacebookのJavaScript SDKを読み込む作業が簡略化されます。シーン内のエンティティにプラグインスクリプト lib/facebook-setup.js
をアタッチし、fb:init
イベントをリッスンするだけで、APIが利用可能になります。詳しい手順はGitHubのページでご確認ください。
this.app.on("fb:init", function () {
// use API
FB.login();
}, this);`