summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-01-12 00:42:42 +0000
committerZach Copley <zach@controlyourself.ca>2009-01-12 00:42:42 +0000
commit7ce7c756e83386803bea3fb543d5b21fbd9db980 (patch)
tree5f38b8b3922b2991acfd9361070bdd4a19594856
parenta373e6f500e172fed02ea6c892b69af69da4f688 (diff)
trac750 Exclude Facebook friends who are already using Identi.ca app from invitee list
-rw-r--r--actions/facebookinvite.php9
-rw-r--r--actions/facebooksettings.php2
-rw-r--r--lib/facebookaction.php2
3 files changed, 9 insertions, 4 deletions
diff --git a/actions/facebookinvite.php b/actions/facebookinvite.php
index b3653c78b..7addc4b31 100644
--- a/actions/facebookinvite.php
+++ b/actions/facebookinvite.php
@@ -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');
diff --git a/actions/facebooksettings.php b/actions/facebooksettings.php
index 88364c797..862dc0732 100644
--- a/actions/facebooksettings.php
+++ b/actions/facebooksettings.php
@@ -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'));
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index ddf81c034..3a00c71dd 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -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',