]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Facebook/FBC_XDReceiver.php
OStatus: fix regressions from merge
[quix0rs-gnu-social.git] / plugins / Facebook / FBC_XDReceiver.php
1 <?php
2
3 if (!defined('STATUSNET') && !defined('LACONICA')) {
4     exit(1);
5 }
6
7 /*
8  * Generates the cross domain communication channel file
9  * (xd_receiver.html). By generating it we can add some caching
10  * instructions.
11  *
12  * See: http://wiki.developers.facebook.com/index.php/Cross_Domain_Communication_Channel
13  */
14 class FBC_XDReceiverAction extends Action
15 {
16
17     /**
18      * Do we need to write to the database?
19      *
20      * @return boolean true
21      */
22
23     function isReadonly()
24     {
25         return true;
26     }
27
28     /**
29      * Handle a request
30      *
31      * @param array $args Arguments from $_REQUEST
32      *
33      * @return void
34      */
35
36     function handle($args)
37     {
38         // Parent handling, including cache check
39         parent::handle($args);
40         $this->showPage();
41     }
42
43     function showPage()
44     {
45         // cache the xd_receiver
46         header('Cache-Control: max-age=225065900');
47         header('Expires:');
48         header('Pragma:');
49
50         $this->startXML('html');
51
52         $language = $this->getLanguage();
53
54         $this->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml',
55                                           'xml:lang' => $language,
56                                           'lang' => $language));
57         $this->elementStart('head');
58         $this->element('title', null, 'cross domain receiver page');
59         $this->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.debug.js');
60         $this->elementEnd('head');
61         $this->elementStart('body');
62         $this->elementEnd('body');
63
64         $this->elementEnd('html');
65     }
66
67 }
68