Debian Codegraph @

src/services/castlefacebook.pas

raw
1 {
2 Copyright 2017-2018 Michalis Kamburelis.
3
4 This file is part of "Castle Game Engine".
5
6 "Castle Game Engine" is free software; see the file COPYING.txt,
7 included in this distribution, for details about the copyright.
8
9 "Castle Game Engine" is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 ----------------------------------------------------------------------------
14 }
15
16 { Initial Facebook SDK integration (TFacebook). }
17 unit CastleFacebook;
18
19 {$I castleconf.inc}
20
21 interface
22
23 uses Classes;
24
25 type
26 { Facebook SDK integration.
27 On Android ( https://castle-engine.io/android-Project-Services-Integrated-with-Castle-Game-Engine#facebook )
28 and on iOS ( https://castle-engine.io/ios-Services#facebook ).
29 }
30 TFacebook = class(TComponent)
31 public
32 class procedure LoginButton;
33 class procedure LogAchievedLevel(const Level: String);
34 end;
35
36 implementation
37
38 uses CastleMessaging;
39
40 class procedure TFacebook.LoginButton;
41 begin
42 Messaging.Send(['facebook-login-button']);
43 end;
44
45 class procedure TFacebook.LogAchievedLevel(const Level: String);
46 begin
47 Messaging.Send(['facebook-log-achieved-level', Level]);
48 end;
49
50 end.