),
'limit' => 0
);
-
$users = elgg_get_entities_from_plugin_user_settings($options);
if ($users) {
}
/**
- * Returns the url to authorize a user.
+ * Gets the url to authorize a user.
*
* @param string $callback The callback URL
*/
-function twitter_api_get_authorize_url($callback = NULL) {
+function twitter_api_get_authorize_url($callback = NULL, $login = true) {
global $SESSION;
elgg_load_library('twitter_oauth');
'oauth_token_secret' => $token['oauth_token_secret'],
);
- return $twitter->getAuthorizeURL($token['oauth_token']);
+ return $twitter->getAuthorizeURL($token['oauth_token'], $login);
}
/**
<?php
/**
- *
+ * User settings for Twitter API
*/
$user_id = elgg_get_logged_in_user_guid();
if (!$access_key || !$access_secret) {
// send user off to validate account
- $request_link = twitter_api_get_authorize_url();
+ $request_link = twitter_api_get_authorize_url(null, false);
echo '<div>' . elgg_echo('twitter_api:usersettings:request', array($request_link, $site_name)) . '</div>';
} else {
$url = elgg_get_site_url() . "twitter_api/revoke";