]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
trac750 Exclude Facebook friends who are already using Identi.ca app from invitee...
authorZach Copley <zach@controlyourself.ca>
Mon, 12 Jan 2009 00:42:42 +0000 (00:42 +0000)
committerZach Copley <zach@controlyourself.ca>
Mon, 12 Jan 2009 00:42:42 +0000 (00:42 +0000)
actions/facebookinvite.php
actions/facebooksettings.php
lib/facebookaction.php

index b3653c78b30be48534fa8e1dded20a51a31e1dd0..7addc4b31d7ef01657fb4159d233237f9ad4d194 100644 (file)
@@ -40,6 +40,10 @@ class FacebookinviteAction extends FacebookAction
 
         $this->show_header('Invite');
 
+
+        // Get a list of users who are already using the app for exclusion
+        $exclude_ids = $facebook->api_client->friends_getAppUsers();
+
         $content = 'You have been invited to Identi.ca! ' .
             htmlentities('<fb:req-choice url="http://apps.facebook.com/identica_app/" label="Add"/>');
 
@@ -50,8 +54,9 @@ class FacebookinviteAction extends FacebookAction
                                                       'content' => $content));
 
         $actiontext = 'Invite your friends to use Identi.ca.';
-        common_element_start('fb:multi-friend-selector', array('showborder' => 'false',
-                                                               'actiontext' => $actiontext));
+        common_element('fb:multi-friend-selector', array('showborder' => 'false',
+                                                               'actiontext' => $actiontext,
+                                                               'exclude_ids' => implode(',', $exclude_ids)));
 
         common_element_end('fb:request-form');
 
index 88364c79795f9680add6f4d3f771c976128a1fa7..862dc073222054176fe1cc13c0dc87be2cf1440e 100644 (file)
@@ -70,8 +70,8 @@ class FacebooksettingsAction extends FacebookAction
         common_element_start('p');
         common_element('fb:add-section-button', array('section' => 'profile'));
         common_element_end('p');
-        common_element_end('fb:if-section-not-added');
 
+        common_element_end('fb:if-section-not-added');
         common_element_start('p');
         common_element_start('fb:prompt-permission', array('perms' => 'status_update'));
         common_element('h2', null, _('Allow Identi.ca to update my Facebook status'));
index ddf81c034bf68ac497e7517ae4507db7bcd95c94..3a00c71dd0108e72faf569edb23c98978d111786 100644 (file)
@@ -48,7 +48,7 @@ class FacebookAction extends Action
         common_element('fb:tab-item', array('title' => 'Home',
                                             'href' => 'index.php',
                                             'selected' => ($selected == 'Home')));
-        common_element('fb:tab-item', array('title' => 'Invite Friends',
+        common_element('fb:tab-item', array('title' => 'Invite',
                                             'href' => 'invite.php',
                                             'selected' => ($selected == 'Invite')));
         common_element('fb:tab-item', array('title' => 'Settings',