Simple:Press Documentation

Plugin: Social Network Connector


Table of Contents


  1. Plugin Description
  2. Plugin Features
  3. Installation and Activation
  4. Connector Profiles
  5. Facebook Linked Account
  6. Twitter Linked Account
  7. Discord Linked Account

Plugin Description

The Simple:Press Social Network Connector is a plugin for Simple:Press that allows you to connect your Simple:Press forum to social networks, Facebook, Twitter, and Discord.

Once connected to your chosen social networks, Simple:Press Social Network Connector can be configured to either send forum posts to a social network account, or fetch social network posts from a social network account, to be displayed on a specific Simple:Press forum.

This plugin is not available as part of our bundles – it is only available when combined with a services contract.  This restriction is in place because it can be difficult to configure the social network API tokens required to send and receive data.

Plugin Features

  • 2 way integration with Facebook, Twitter & Discord
  • Features for automatic and manual moderation
  • Different forums can pull/push data to different services

You can create connections to multiple social networks and link each of them to a different forum.

For two-way connections you will need to create at least two connections – one to pull data from the social network and another to push data to it.


Installation and Activation


Simple:Press Social Network Connector is installed through the Simple:Press Administration menu.

From the Simple:Press admin menu, click on Plugins, and then click the Plugin Uploader menu item. You’ll be takien to the Plugin Uploader interface.

Click Select File, and select the Social Connecter plugin zip file from your computer. Click Upload Now to upload and install the plugin files.

The plugin will be installed to Simple:Press. Click Return to SP plugins page to view the available plugins.

Once installed, the plugin will be listed in the Available Plugins list. Click Activate to activate the plugin.

The icon next to the plugin name changes from a red cross to a green tick when activated, and the Social Network Connector menu item will appear in the Simple:Press admin menu, where you can manage or add Connector Profiles.


Connector Profiles


Connector Profiles are a series of settings that manage the connection between your social media networks. You will need to create a separate Connector Profile for each social media network provider, as well as separate profiles for different Connection Types.

For bi-directional connections, you will need to create two profiles – a “push” profile that sends data to the social network and a “pull” profile that imports data from the network.

Each Connector Profile has the following common settings.

Connection Types

When configuring a Connector Profile, you need to specify a Connection Type. This can be one of either Push or Pull.

  1. Push connections will send forum posts from the Simple:Press forum to the social media network linked to this Connector Profile
  2. Pull connection will fetch social media posts from the social media network linked to this Connector Profile to the Simple:Press forum

Network Settings

Linked Account

This is the social network provider account that the profile is connected to.

To create a linked account for each of the available social media networks click on the relevant link below.

  1. Create a Facebook Linked account
  2. Create a Twitter Linked account
  3. Create a Discord Linked account

Connection Settings

Name of Connection

This is the name you specify for this connection and will display in the list of Connector Profiles.

Description

A short description of this Connector Profile.

Connection Type

Whether this is a Push or a Pull connection.

Please note the following when configuring a Push connection, for each of the currently supported social networks.

  1. Forum post titles will be excluded, and only the body of the forum post will be pushed. The post author’s username will be included in the Tweet, as a hashtag (eg #jondoe)
  2. The post body will be truncated to the Twitter character limit of 280 chars.

Please note the following when configuring a Pull connection, for each of the currently supported social networks.

  1. Only the text content of the social media post will be included in the forum post body, no images or media will be included.
  2. The forum post author will be set to “Guest”.

Select Forums

The Simple:Press forum which should display the social media posts (for pull connections) or which should act as the source of social media posts (for push connections)

Auto Publish

Enable or disable Auto Publish. Auto Publish is only applicable for Pull connections. When enabled, it will automatically publish the fetched posts to the destination forum(s) selected under Select Forums (above). When disabled, fetched posts will be published to the SNC Queue forum (set up via Social Network Connect – Options) and posts can then be moved manually from the SNC Queue forum to the desired destination forum.

Frequency (minutes)

How often the data is pulled from or pushed to the linked social network account. If Auto Publish is enabled, the posts pulled from social media will automatically be published to the chosen forum(s) otherwise they will be published to the SNC Queue forum.

Positive Keywords

A list of keywords that forms part of the auto-moderation process. Posts that contain any of the keywords marked as positive will be allowed to be published to the selected forum(s) or the SNC Queue forum if Auto Publish is disabled.

Negative Keywords

A list of keywords that forms part of the auto-moderation process. Posts that contain any of the keywords marked as negative will not be allowed to be published to the selected forum(s) or the SNC Queue forum if Auto Publish is disabled.

Trump Keywords

Used to determine what to do in the case where a post is being auto-moderated and contains both positive and negative keywords.

(Positive and negative keywords are simplistic auto-moderation. Posts with positive keywords will always be published. Posts with negative keywords will never be published. But when you have a post with both a positive keyword and negative keyword the you need to figure out what to do with it – publish or withhold? That’s where the TRUMP option comes in (probably can give it a better name) – it indicates which is more important.)



Facebook Linked Account



In order to link a Simple:Press Social Network Connector Profile to Facebook, you first need to register a Facebook Developer account, create a Facebook App and retrieve the relevant API credentials, and then authorize your Connector Profile with the Facebook app.

Note: This information is accurate as of July 2022.  Facebook and other Social Networks constantly change their UI and API / APP settings and conditions.

Create Developer Account

Browse to https://developers.facebook.com/, and click Log In in the top right-hand corner.

You will be asked to log in with your regular Facebook account, and after you log in you’ll be redirected back to the Meta for Developers home page. The Log In link will be replaced by Get Started. Click Get Started to create Facebook for Developers account

(Note that once you complete your Facebook for Developers account link will change to My Apps, and will stay this way going forward.)

On the Register page, you can read the Facebook Platform Terms and Developer Policies, then click Continue.

On the Verify Account screen, select your country code and enter your mobile number, then click Send Verification SMS.

You will be asked to enter the Verification Code sent to you via SMS, then click Continue.

On the Contact Info screen, enter the email address you would like to be associated with your developer account. Click Confirm Email.

On the About You page, you can choose the role that describes you best. If you’re not sure, choose Developer, then click Complete Registration.

Once you’ve completed your developer profile setup, you’ll be taken to the My Apps page, where you can create your first Facebook App.

Create Facebook App

A Facebook app is required to connect a Facebook account as a Connector Profile.

To create your first app, click on the green Create App button.

Select the type of app you want to create. For the purposes of a Simple:Press forum you can select None and click Next.

On the next screen, give the app a name, and add your email address. Click Create App to create the app.

You may be required to reenter your Facebook account password.

Once the app is created, you’ll be taken to the App dashboard. You now need to retrieve the App ID and App secret, to create a Connector Profile. To do this, click on Settings in the menu, and then Basic.

At the top of this screen, you can copy the App ID. Click Show next to the App secret to display the App secret and copy it.

Create Linked Account

You now need to navigate back to your Social Network Connector Profile, to connect to Facebook. If you haven’t already, create a new Connector Profile, and select Facebook from the Select Social Network Provider dropdown.

Enter the App ID and the App Secret in the appropriate fields. For the Target select whether you want to connect the profile to a Page or a Group. Click Start Connecting to initiate the process.

A popup will appear asking you to enable the Login with Javascript SDK option. Click OK and close this popup.

Then, open a separate browser instance to https://developers.facebook.com/, and navigate to your Facebook app dashboard.

A new option called Facebook Login will have appeared under Products. Click on Facebook Login and then Settings.

In the Client OAuth Settings screen, enable the Login with the JavaScript SDK toggle, and enter the URL of the Simple:Press forum in the Allowed Domains field. Click Save changes.

Go back to your Connector Profile and click Start Connecting again. A new popup will appear, click Continue.

Click Continue again.

Once the Connector Profile has been completed, you’ll be able to select either the Facebook page or group you want to link to this profile. Select the relevant page or group, then click Link Account.

Once a successful connection has been made, the details for the Facebook app will appear under the Linked Account section of the Connector Profile.

You may now complete the rest of the Connector Profile settings.



Twitter Linked Account



In order to link a Simple:Press Social Network Connector Profile to Twitter, you first need to register a Twitter Developer account, create a Twitter App and retrieve the relevant API credentials, enable the authentication methods, and then authorize your Connector Profile with the Twitter app.

Note: This information is accurate as of July 2022.  Facebook and other Social Networks constantly change their UI and API / APP settings and conditions.

Create Developer Account

If you don’t already have a Twitter developer account, you need to apply for access. Start by browsing to https://developer.twitter.com/en/apply-for-access.

You will need to add a valid phone number and verify that phone number.

Once you have verified the phone number, you will need to enter your name, select your country, your use case, and whether you will make Twitter information available to a government or affiliated entity. Once you’ve filled in those fields, click Next.

Finally, accept the Developer Agreement and click Submit.

Create App

On the next screen, you can create your first app. Enter the name for the app, and click Get keys.

The app will be created, and you’ll be able to copy the API Key, and the API Secret Key. Once you have copied those values, click Skip to dashboard.

Twitter will confirm that you have copied your keys and tokens, and present them to you one last time, just in case. Click Yes, I saved them.

You’ll be taken to the dashboard, click Skip tour to close the tour.

Configure App

Next you will need to configure the User authentication settings. You will need to enable both OAuth 1.0a and Oauth 2.0.

Start by enabling OAuth 1.0a. Click on the gear icon next to the app name, to go to the App Settings.

Scroll down, and click on Set up under User authentication settings.

Enable OAuth 1.0a and select Read and Write in the App permissions.

  • Scroll down and enter the Callback URI and Website URL.

    Click Save to save the settings.

Elevated Access

Once OAuth 1.0a is enabled, you need to enable elevated access, which allows you to enable OAuth 2.0. Click on the Dashboard menu item, and then click on the Project name.

On the Project Overview screen, click on the Apply for Elevated button

The basic info page is the same info you verified in the previous steps, so click Next.

In the intended use screen, you will be asked to describe how you plan to use the Twitter API. It’s a good idea to be as truthful as possible, so include that you are using it to connect your site to Twitter, in order to create Tweets from forum posts, and create posts from Tweets. Click Next once you are ready to proceed.

Review all the data, then click Next.

Finally, agree to the terms and click Submit. You elevated access request will be reviewed and can take up to 5 days to be approved.

Once elevated access is approved, to back to the App settings, and you will be able to enable OAuth 2.0.

You will need to select the type of app for OAuth 2.0 permissions, select Web App, and click Save to save the settings.

Create Linked Account

You now need to navigate back to your Social Network Connector Profile, to connect to Twitter. If you haven’t already, create a new Connector Profile, select Twitter from the Select Social Network Provider dropdown, enter your App Key and App Secret Key, and click Start Connecting.

A pop up will appear asking you to Authorise Simple:Press Social Connector to your Twitter app, click Authorize app.

Once the app has been authorized, click Link Account.

Once a successful connection has been made, the details for the Twitter app will appear under the Linked Account section of the Connector Profile.

You may now complete the rest of the Connector Profile settings.



Discord Linked Account



Create App

Browse to https://discord.com/register?redirect_to=%2Fdevelopers%2Fapplications and log in with your Discord account, or create a new account if you don’t already have one. Once logged in/registered you’ll be taken to the Developer Portal.

Click New Application to create a new App.

In the popup that appears, enter a name for your App, and then click Create.

The App will be created, and you’ll be taken to the General Information page.

Next, click on Oauth2 -> General. You need to add a redirect to your Simple:Press site, so that you can authorize your Connector Profile with the App, so click Add Redirect.

The Redirects section will appear, and you can enter a Redirect URI.

Enter the redirect URI for your Simple:Press site using the following format:

https://yourdomain.com/wordpress/wp-admin/admin- ajax.php?action=socialmedia-admin&snc_action=snc_discord_login_cb

Replace yourdomain.com with the actual domain of your site, and click Save Changes.

If you have entered the Redirect correctly, the changes will be saved to the App.

Create Server

To create a server, open a new window or tab, and browse to https://discord.com/channels/@me.

Click on the green + Add Server button.

Select Create My Own.

Select whether this is for a club or community, or for you and your friends. Alternatively, you can skip this question.

Give the server a name, and upload a logo if you have one, then click Create.

Once the server is created, it will be added to your server list, and you will be able to start inviting folks.

By default, a new server is created with a “general” channel. You can create additional channels by clicking on the + Create Channel button.

Enter the channel name, and whether it is private or not and click Create Channel to add it.

Create Chat Bot

Go back to the Developer portal at https://discord.com/developers/applications and click on the App you created earlier. Click on Bot in the menu, and click Add Bot.

Click Yes, do it!.

Your bot will be created, with the same name as your App.

Next, click on Oauth2 > URL Generator. Under the Scopes section, check bot.

Scroll down to Bot Permissions and check Manage Server, Manage Channels, Send Messages, Create Public Threads, Create Private Threads, Send Messages in Threads, Manage Messages, and Manage Threads. Then, copy the Generated URL at the bottom of the screen.

Open a new browser, paste the generated URL and hit enter to browse to that URL. This will start the process of authorising the bot with your App.

Select the server you created earlier, and click Continue.

Verify that all the permissions are correct, and then click Authorise.

Once the bot is authorized, you can close this window/tab.

Under the bot username, copy the token, which you will need for your Simple:Press Social Network Connector Profile.

Create Linked Account

You now need to navigate back to your Social Network Connector Profile, to connect to Discord. If you haven’t already, create a new Connector Profile, select Discord from the Select Social Network Provider dropdown, enter the bot Token, and click Start Connecting.

In the Server select that appears, select the Discord server to connect to.

Then select the channel to connect to, and click Link Account.

Once a successful connection has been made, the details for the Discord connection will appear under the Linked Account section of the Connector Profile.

You may now complete the rest of the Connector Profile settings.

More Topics In SimplePress: Plugins


Copyright © 2006-2020 Simple:Press. All Rights Reserved.