How to install

28 Aug 2018
This is the official documentation with all the info you need to install, configure and use MyTwitter Connect correctly.


Port check

MyTwitter Connect is equipped with a port check. You do need port 443 to be open in order for this plugin to work: a notice will be fired if the connection test returns false. You can still install the plugin by clicking on the dedicated install button which appears in the notice, but if you encounter odd problems like expired tokens which don't let you use the plugin, you might relate to this note. Open your server's 443 port, or ask your host to open it for you.

1. Set up the Twitter Application

First of all you need to create a Twitter application with some basic configuration options. Note that you must apply to be a Twitter developer before being allowed to create applications, and it may take some time to be approved as a developer.

1. Create the app

Open this link and click on the Create an app button.

[Image: T4W1KVt.png]

You will be asked to fill in some details for your application.

2. Activate the Login with Twitter platform

When creating the application, you will need to tick the Enable sign in with Twitter checkbox. You will also need to add 2 redirect URIs in the following box:

[Image: YKbUYtk.png]

You must add 2 redirect URIs for MyTwitter Connect:
  • YOURBOARDURL/mytwconnect.php
  • YOURBOARDURL/usercp.php

Replace YOURBOARDURL with your fully qualified board URL. MTC uses "Board URL" setting to build URIs, so ensure you are using the one you have entered in your board's preferences. Beware: the protocol MUST match the one you are using. and ARE DIFFERENT URIs.

Extra. Requiring email permissions

Twitter does not send the user's email alongside standard API requests. You will need to enable email permissions from the "Permissions" panel if you want to get the user's email, which is a handy feature for faster registrations.

Tick the checkbox: Permissions > Additional permissions > Request email address from users.

[Image: GFEl3Pa.png]

You will need to add a privacy policy URL before using this permission.

2. Upload files

Download MyTwitter Connect and upload all the files you find in the package to your MyBB root, which is likely where you have put all the MyBB files (easier to say, the folder where the file global.php is in). All of them are required for MyTwitter Connect to work flawlessly, so ensure you retain the same file and folder structure.

3. Install the plugin

Open your Admin Control Panel and, within the Plugins section, Install & Activate MyTwitter Connect. An attempt to edit header_welcomeblock_guest template will be made in order to add the login button. Custom themes may not be modified by the search and replace routines, so you might need to add it by yourself.

4. Configure the plugin

As you may now notice, if you try to login clicking the button in your Forum's header you won't be able to connect, and an error will appear. This is because you need to add your Twitter application keys to MyTwitter Connect. They are long alphanumeric strings which are required for the plugin to exchange data between your board and your Twitter application.

Open Twitter Developers and copy your Consumer API keys. You can ignore access tokens. Paste them into MyTwitter Connect settings accordingly.

And you're done. Now you can use MyTwitter Connect to login and register through Twitter!