Construct 2 is being retired on 1 Jul, 2021. We strongly recommend upgrading to Construct 3.
The Twitter plugin allows a Follow, Share or Tweet button to appear in-game.
Twitter plugin compatibility
Since the Twitter API depends on opening separate browser windows, it usually only works inside a normal web browser. This means the button may not work when built in to a native app for Android or iOS, such as with Crosswalk, Ejecta or CocoonJS. To work around this, use the Browser object's Open URL in new window action to open a Twitter page instead.
- One of the following button types: Follow: a 'Follow' button to follow a Twitter account. The Share property should be the name of the Twitter account to follow, but without the @, e.g. Scirra to follow the account @Scirra. Share: a 'Tweet' button to share a URL. The Share property must be a valid URL, e.g. http://www.scirra.com. The initial tweet text is set to the Text property, optionally displaying as Via a given account, with optional Hashtags. Mention: a button to send a public tweet to another account. The Share property should be the name of the Twitter account to tweet to, without the @. The initial tweet text is set to the Text property, optionally displaying as Via a given account, with optional Hashtags. Hashtag: a button to tweet with a hashtag. The Share property should be the hashtag to tweet with, without the [#] (e.g. Scirra to tweet with hashtag [#]Scirra). Additional hashtags can be added with the Hashtags property. The initial tweet text is set to the Text property, optionally displaying as Via a given account.
- The account to follow or mention, URL to share, or hashtag to tweet, depending on Type.
- The initial text to have in the tweet, which is selected so the user can easily replace it. This is not used when the Type is Follow.
- Optionally display the tweet as being via another twitter account, e.g. via @Scirra. The account should be set in this property without the @, e.g. Scirra to tweet via @Scirra. This is not used when the Type is Follow.
- Comma-separated hashtags to add to the tweet, without the [#] (e.g. construct2,html5 to add the hashtags [#]construct2 [#]html5). This is not used when the Type is Follow. When the Type is Hashtag, the actual hashtag to share must be entered in the Share property instead, but this property can then be used to add extra hashtags to the tweet.
- Initial visibility
- Whether the button is initially visible or invisible.
- For Follow or Share buttons, which direction to show the count of how many users already follow or have already shared, or None to not show any count.
- Whether to use a medium or large style button.
- An ISO 639-1 language code to use for the button, which affects the text appearing on the button and in the popup window.
On button loaded
Triggered when the button has successfully loaded and is ready to be interacted with by the user. The button may not display until this triggers.
- Set hashtags
- Set share
- Set text
- Set via
- Set the corresponding object properties. For more information, see the properties documentation above. Any changes will not take effect until the button is reloaded.
- Reload the button, so any changed properties then take effect.
The Twitter plugin does not have any of its own expressions.
Construct 2 Manual
You are here:
Search this manual:
This manual entry was last updated on 11 Jun, 2020 at 10:20