]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/facebookhome.php
update version in README, add note about status.net
[quix0rs-gnu-social.git] / actions / facebookhome.php
index 34989c9786aa9814f9396d49bcba0db3934e9af3..70f20520530d2140ea7a4709d9fa2736d70160ae 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, 2009, Control Yourself, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -17,7 +17,7 @@
  * along with this program.     If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
 require_once INSTALLDIR.'/lib/facebookaction.php';
 
@@ -57,7 +57,7 @@ class FacebookhomeAction extends FacebookAction
 
             // If this is the first time the user has started the app
             // prompt for Facebook status update permission
-            if (!$this->facebook->api_client->users_hasAppPermission('status_update')) {
+            if (!$this->facebook->api_client->users_hasAppPermission('publish_stream')) {
 
                  if ($this->facebook->api_client->data_getUserPreference(
                     FACEBOOK_PROMPTED_UPDATE_PREF) != 'true') {
@@ -203,7 +203,7 @@ class FacebookhomeAction extends FacebookAction
         $api_key = common_config('facebook', 'apikey');
 
         $auth_url = 'http://www.facebook.com/authorize.php?api_key=' .
-            $api_key . '&v=1.0&ext_perm=status_update&next=' . $next .
+            $api_key . '&v=1.0&ext_perm=publish_stream&next=' . $next .
             '&next_cancel=' . $next . '&submit=skip';
 
         $this->elementStart('span', array('class' => 'facebook-button'));