When I got to user/%/edit/twitter there is no form for the user. I thought it was maybe a permissions issue, but my permissions are fine. I've attached a file illustrating the problem.

CommentFileSizeAuthor
twitterform.png31.74 KBinfines
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

juampynr’s picture

Component: Code » User interface
Category: bug » support
Priority: Critical » Minor
Status: Active » Fixed

Twitter account management has been moved to admin/config/services/twitter. You can access it through the administration menu.

infines’s picture

How are users supposed to link their twitter accounts then? They will have to have an admin do it?

juampynr’s picture

@gridbitlabs, you can give them permission to access that page and add their account.

sonoutlaw’s picture

@gridbitlabs, looks like the module has been hobbled a bit. No longer can a Drupal user be easily associated with their Twitter account . Users can be given permission to access the admin settings for the module to add/delete Twitter accounts, but cannot associate a twitter account from their account settings.

If users are granted the rights to add, they also ge the right to delete anyone else's Twitter account. When they add an account, it does get associate with their Drupal uid.

For years this module was the most convenient way to associate Twitter accounts with Drupal users. I still very much appreciate the hard work that has gone into this module over the years. I just hope that the past functionality can be returned.

juampynr’s picture

The above can be achieved by the following steps:

Let's say user Foo wants to add the twitter account @foo:

1. Give permission to a role that Foo has assiged to Add twitter accounts to a certain role.
2. Provide a link to admin/config/services/twitter so she can add the account and mark wether she wants teets and/or mentionts to be pulled.
3. On cron run, her tweets will be pulled into the database.
4. Open /tweets/foo to see the tweets by this user. A block can be used too.

sonoutlaw’s picture

I quickly added this into a custom module I already had for the site I am working on. It will add a Twitter Tab to the user account page. It then pulls the twitter accounts for the given user and account add function form. I just reused most of the existing twitter_user_settings() from twitter.pages.inc and substituted twitter_account_load_all() from twitter.inc with a different query using the current user->uid

function MODULENAME_menu() {
	$items['user/%user/twitter'] = array(
		'title' => 'Twitter',
		'access callback' => 'twitter_account_access',
		'page callback' => 'MODULENAME_twitter_tab',
		'type' =>	MENU_LOCAL_TASK
	);
	return $items;
}


function MODULENAME_twitter_tab(){
	module_load_include('inc', 'twitter', 'twitter.pages');
	// Verify OAuth keys.
	if (!twitter_api_keys()) {
		$output = t('<p>You need to authenticate at least one Twitter account in order to use the Twitter API. Please fill out the OAuth fields at <a href="/admin/config/services/twitter/settings">Twitter Settings</a> and then return here.</p>');
	}
	else {
		module_load_include('inc', 'twitter');
		global $user;
		$twitter_accounts = array();
		$output = array();
		
		$result = db_query('SELECT twitter_uid
						FROM {twitter_account}
						WHERE uid = :uid
						ORDER BY screen_name', array(':uid' => $user->uid));
		foreach ($result as $account) {
			$twitter_accounts[] = twitter_account_load($account->twitter_uid);
		}
	
		if (count($twitter_accounts)) {
			// List Twitter accounts.
			$output['header'] = array(
				'#markup' => t('<p>Tweets are pulled from Twitter by ' .
						'<a href="/admin/reports/status/run-cron?destination=admin/config/services/twitter">running cron</a>. ' .
						'You can view the full list of tweets at the <a href="/tweets">Tweets</a> view.</p>'),
			);
			$output['list_form'] = drupal_get_form('twitter_account_list_form', $twitter_accounts);
		}
		else {
			// No accounts added. Inform about how to add one.
			$output['header'] = array(
				'#markup' => t('<p>No Twitter accounts have been added yet. Click on the following button to add one.</p>'),
			);
		}
		
		$output['add_account'] = array(
			'#type' => 'fieldset',
			'#title' => t('Add Twitter accounts'),
			'#weight' => 5,
			'#collapsible' => TRUE,
			'#collapsed' => FALSE,
		);

		if (user_access('add authenticated twitter accounts')) {
			$output['add_account']['form'] = drupal_get_form('twitter_auth_account_form');
		}
		if (twitter_connect()) {
			$output['add_account']['non_auth'] = drupal_get_form('twitter_non_auth_account_form');
		}
	}

	return $output;
}
infines’s picture

What version of this module still supports this? 3.x perhaps or 4.x?

infines’s picture

It is Twitter 7.3.3

sonoutlaw’s picture

@gridbitlabs, I think it is 7.x-3.3 that still has the functioning user account/twitter account tab.

infines’s picture

Status: Fixed » Closed (fixed)