Twitter API Configuration
To use Twitter login feature, you need to create Twitter application and link it to your site. Twitter will generate application id and secret, which you need to copy and set in Social Suite extension configuration.
1. Create Twitter developer account:
-
Go to developer.twitter.com and press
Apply
link at top right and thenApply for a developer account
. -
Select Twitter account to use and add phone number if you didn’t add it before.
-
Follow steps to create account. In
Describe in your own words what you are building
you can write something like this:1. I am using Twitter's API to login or register customers in Magento 2 store. 2. I do not plan to analyze Tweets, i only need user email and name to login or create account in shop. 3. No, my solution will not tweet, retweet or like content. 4. I will not display Twitter content in my solution. Only user email and name will be displayed in customer account.
-
Wait until developer account will be approved.
2. Configure Twitter application:
-
On developer.twitter.com go to
Apps
and pressCreate An App
. -
Fill required app details: App name, Application description, Website URL and Tell us how this app will be used.
Check
Enable Sign in with Twitter
checkbox and fillCallback URLs
with valuehttps://[your.domain]/sociallogin/social/login/id/twitter
.If you are not sure what callback URL to use, go to Magento admin
Stores > Configuration > Swissup Social Suite > Social login > Social Networks > Twitter
and copy generated value from
Redirect URI
field.Also fill
Terms of Service URL
andPrivacy policy URL
, as they are required to enableRequest email address from users
on the next step. Finally, pressCreate
button. -
Go to
Permissions
tab and pressEdit
. InAccess permission
selectRead-only
. InAdditional permissions
checkRequest email address from users
checkbox. PressSave
button.
3. Set app id and secret in Social Login configuration:
-
In your application, go to
Keys and tokens
page and copyConsumer API keys
. -
In Magento admin, go to
Stores > Configuration > Swissup Social Suite > API Credentials > Twitter
and insertConsumer Key
andConsumer Secret
from your app.
4. Now you can enable Twitter login feature in
Stores > Configuration > Swissup Social Suite > Social login > Social Networks > Twitter