Skip to content

Twitter

Nicholas K. Dionysopoulos edited this page Mar 19, 2018 · 9 revisions

Overview

The Akeeba Social Login - Twitter integration plugin allows user on your site to use their Twitter account to login or register a user account on your site.

Setup on Twitter

DISCLAIMER: This parts of our documentation describing the interaction with a third party service is for information purposes only. It should be treated as indicative and used at your own risk. Akeeba Ltd can only attest that this part of the documentation has been the faithful transcription of the steps we took at the time of its writing. We strongly recommend that you consult the documentation of the third party service for accurate instructions. Should the behavior of the third party service differ from what is published in our documentation you should consult the support of the third party service provider. Do not seek support from us for such matters; Akeeba Ltd cannot provide support for third party services, is not responsible for or notified about any changes in said services, nor is it obligated to update the documentation pursuant such changes.

Before you can use Twitter login on your site you must create a Twitter "app". Even though it sounds scary, a Twitter App is simply a way for you to get a set of access codes which let you identify your site on Twitter.

Start by visiting the Twitter apps page. Towards the top right of the page, click on Create New App.

In the new page enter a name and description for your app. These are show to your site's visitors. Choose something which explains to them that they are logging into your site.

In the website field enter the URL to your site. Ideally, this should be a landing page explaining that you are asking for Twitter access to let your users log in and link to your privacy policy and / or terms of service pages if applicable.

In the Callback URL field use http://www.example.com/index.php?option=com_ajax where http://www.example.com MUST be replaced with your site's URL. For example, if your site is accessible at http://www.abrandnewsite.com/mysite then the Callback URL field must be http://www.abrandnewsite.com/mysite/index.php?option=com_ajax.

Check the Developer Agreement checkbox and click on "Create your Twitter application".

In the page that appears find the Consumer Key (API Key) and click the manage link next to it. A new page opens. You will need to note down two things:

  • Consumer Key (API Key) This goes into the plugin's Twitter Client ID field.
  • Consumer Secret (API Secret ) This goes into the plugin's Twitter Client Secret field.

IMPORTANT If you want to allow people who have NOT already linked their Joomla! user account with their Twitter profile to log into your site and / or create a new user account you must follow the instructions in this paragraph. Edit your Twitter application and fill in both the Privacy Policy and Terms of Service fields. Then first save the changes to your Twitter application, then edit it again. Go to the Permissions tab, scroll down and tick the "Request email addresses from users" box. Click on the Update Settings button to save your changes. Please note that if you do not that Twitter will not send the user's email to Joomla!, therefore logging in an unlinked account or creating a new user account will be impossible as in both cases the email address is required.

Plugin options

Twitter Client ID Enter the Consumer Key (API Key) for your custom Twitter Application here. See the previous section for creating a Twitter Application.

Twitter Client Secret Enter the Consumer Secret (API Secret) for your custom Twitter Application here. See the previous section for creating a Twitter Application.

Allow social login to non-linked accounts When enabled allows users to log in despite not having linked their Twitter account to their site user account. Their Twitter account's email address must be the same as the email account they use on your site.

Create new user accounts Creates a new Joomla! user when a user tries to log in via Twitter but there is no Joomla! user account associated with that email or Twitter User ID. If user registration is disabled no account will be created and an error will be raised. The new Joomla! user will have a username derived from the Twitter account's name, the same email address as the Twitter account and a long, random password (which the user can change once they have logged in). Set this to No to prevent creation of user accounts through Twitter login.

Ignore Joomla! setting for creating user accounts When both this option and the Create new user accounts option above are enabled a new user will always be created, even if you have disabled user registration in the options of Joomla's Users page. This is useful to prevent anyone from registering to your site unless they have a Twitter account.

Bypass user validation Only applies when creating new user accounts. When enabled the new user will be created active, without going through the Joomla! user account validation. This means that no account activation email will be sent to the user or the administrators of the Joomla! site. This makes perfect sense since Twitter has already verified that the user is in control of the email address they are using with their Twitter account.

Button styling When enabled custom CSS for login, link and unlink button styling will be output to the page header. Disable this option if you intend to use your own CSS to style the buttons.

Icon class The icon CSS class to use in the login, link and unlink buttons. Useful to use an icon font such as FontAwesome or Glyphicons to render the logo. If it's left empty, a PNG image with the Twitter logo will be used instead.