application installation instructions:
The oAuth Connect app, created by ClearImageOnline, gives HTML/OS programmers the ability to connect HTML/OS powered websites to third party websites using the oAuth1.0 and oAuth1.0a protocol (different from the oAuth2 protocol). Many third party websites, Twitter for example, use the oAuth1 protocol, and so connecting their data to your website requires you communicate via the oAuth1 protocol.
These instructions will cover the following:
- Installing the ClearImage App Manager (required to install the oAuth Connect app).
- Ensuring your server will work with the oAuth Connect app.
- And finally, proving you can successfully connect to a third party website via the oAuth Connect app. For testing purposes we will attempt to connect via oAuth1 to Twitter, because if you can connect to Twitter, then you shouldn’t have any issues connecting to other third party websites.
Let’s get started!
Log into Array on the domain you wish to install the oAuth Connect app on.
Install the ClearImage App Manager (if you haven’t already). You can do this in your Array Control Panel. Click the ‘Install Product’ link, then install using option 3, which is titled ‘Transfer from Web Location’. Enter the following into the URL field.
Next click the ‘Transfer’ button. Now the App Manager should be installed on your Array desktop.
Open the App Manager and make sure the following 3 programs are installed and using the most current versions: Base Library, Unit Tests, oAuth Connect.
- Tip 1: FYI, installing these apps will have no effect on your Array installation. Their respective folders are simply created in the ‘/apps/api/’ folder.
- Tip 2: If you had to update your Base Library (meaning it was already installed before you started this processes), then to prevent errors from occurring in the next series of steps, you need to log out, then log back in now.
Open the oAuth Connect app. An icon should be on your Array desktop. You should now see these 3 links, which you’ll use moving forward in these instructions:
Sample Twitter App
Run the ‘System Tests’ link to make sure the app will work on your system. If everything looks good AND you see no ‘warning’ text, proceed to the next step. FYI, a common message is “Results: Everything Looks Good. / Warning (comma bug)”, which means everything is not good because we need to fix the ‘comma bug’ in Array to proceed. If you get the ‘comma bug’ error, refer to the link to fix it and you’ll be directed to instructions at http:/href=/blog/2016/01/07/24648336/comma-bug-with-system-tag where you can follow instructions to fix the bug.
Run the ‘Manage Providers’ link and add Twitter as your new provider. (Important: Make sure to enter it as lower case, meaning twitter.)
- Your ‘Signature Method’ is HMAC-SHA1 (because that’s what Twitter uses).
Go to http://twitter.com and log in, then go to https:/apps.twitter.com and create a new app there.
- Tip 1: Your URL is your domain.
- Tip 2: You won’t be using the ‘callback’ option at this point because our intent is to simply test the Twitter to oAuth Connect app connectivity, but for kicks you can enter something like http://example.com/twitter_callback (replace example.com with your domain).
Once you’ve created the app, click “Manage keys and access tokens”. Next, create your access token via the button at bottom of page.
- Now copy/paste all this app data into the ‘twitter’ provider you created in the previous step, saving your information. Note: Twitter Uses HMAC-SHA1 for its signature method
Sample Twitter App
Run the ‘Sample Twitter App’ link. (Hint: If you get this “Recent Tweets: Bad Authentication data.” then you may still have the Comma Bug, or you may’ve failed to log out then back in after updating your Base Library.)
When running the Sample Twitter App, first make sure you see your recent Tweets. That means oAuth Connect is successfully doing a “GET” request. Then, if you add a comment and click “Tweet” that’ll test whether oAuth Connect can write to Twitter via a “POST” request. Congratulations if both requests work, then oAuth Connect is working!