Skip to content

X (Twitter) (OrchardCore.Twitter)

This module adds Twitter for Websites features to OrchardCore.

X (Twitter) Integration

Integrate with X. Provides a client to integrate with X API Configuration can be set through the X -> X Integration menu in the admin dashboard.

Available settings are:

  • API Key: API key found in the keys and tokens tab of your twitter app.
  • API Secret Key: The API secret key of your twitter app.
  • Access Token: Access token key found in the keys and tokens tab of your twitter app.
  • Access Token Secret: The Access token secret key of your twitter app.

Workflows

If the OrchardCore.Workflows is enabled, a new Task is added to Update X Status

Sign in with X (Twitter)

Authenticates users with their X Account.

Create an app in the Twitter Developer Platform and enable Sign in with X.
In the app details, you must configure the Callback URL. The default url in OrchardCore is [tenant]/signin-x.

Configuration can be set through the X -> Sign in with X settings menu in the admin dashboard.

Available settings are:

  • ConsumerKey: API key found in the keys and tokens tab of your twitter app.
  • ConsumerSecret: The API secret key of your twitter app.
  • CallbackPath: The request path within the application's base path where the user-agent will be returned. The middleware will process this request when it arrives. If no value is provided, setup Callback URL in Twitter app to use the default path /signin-x.

Users Registration

  • Enable the OrchardCore.Users.Registration feature when you also want local site registration.
  • New external-user creation and profile generation are controlled from the Users module's ExternalRegistrationSettings.
  • An existing user can link the account through the External Logins link from the user menu.

Recipe Configuration

X (Twitter) settings can be configured using the Settings recipe step:

{
  "steps": [
    {
      "name": "settings",
      "TwitterSettings": {
        "ConsumerKey": "your-api-key",
        "ConsumerSecret": "your-api-secret-key",
        "AccessToken": "your-access-token",
        "AccessTokenSecret": "your-access-token-secret"
      }
    }
  ]
}
Property Type Description
ConsumerKey String The API Key (Consumer Key) from the X Developer Portal. Required.
ConsumerSecret String The API Secret Key (Consumer Secret). Required.
AccessToken String The Access Token from the X Developer Portal.
AccessTokenSecret String The Access Token Secret.

X (Twitter) Settings Configuration

The OrchardCore.Twitter module allows the user to use configuration values to override the settings configured from the admin area by calling the ConfigureTwitterSettings() extension method on OrchardCoreBuilder when initializing the app.

The following configuration values can be customized:

{
  "OrchardCore_X": {
    "ConsumerKey": "",
    "ConsumerSecret": "",
    "AccessToken": "",
    "AccessTokenSecret": ""
  }
}

For more information please refer to Configuration.