Creating an App
To create an application, you have to register on Twitter, go to the https://apps.twitter.com page and follow these steps:
-
- Click “Create New App”;
- Fill the fields by assigning:
- A name (example: Network Station);
- A description (example: “Network Station Twitter social login”);
- The application’s domain (example: http://mydomain). You have to enter the complete domain name that you have configured in “ System Settings” in the “Domain Name”. If you are using multiple Network Stations in high availability, enter the domain of the master server;
- Enter the “Callback URL” in the form http://mydomain/social/twitterlogin.php. Instead of “mydomain”, enter the complete name of the configured domain in the “ System Settings” in the “Domain name” field. If you are using multiple Network Stations in high availability, enter the domain of the master server;
- Accept the conditions;
- Press “Create your Twitter application”;
- Click “Settings”, scroll down in the page and complete the data with an icon, company name and company URL, and press “Update settings”;
- Click “Permissions” and click “Read, Write and Access direct messages” and then click “Update settings”;
- Click “Keys and Access Token”, copy the values “Consumer Key (API Key)” and “Consumer Secret (API secret)”. These values must be copied and typed in the “ External Authentications” settings of Network Station in the “Twitter API key” and “Twitter API” secret “fields.
Asking Users to Click “Follow”
As for Facebook, at the end of registration or at user login, you can invite him to click “Follow” to another user by entering the “Username” in the domain or HGW configuration in order to make appear the Twitter updates on the user’s dashboard. To do this you need to create a Twitter account. Once registered, press the button on the top, select “View profile” and copy the last part of the URL. In practice, if it is reported https://twitter.com/username, the username is the name of the user.