Using Twitter OAuth key-secret Configuration Guidelines

What?

Use Twitter as 3rd party application for registering a new user or logging into ODS DataSpace as already registered ODS User which account is associated with a given Twitter account.

Why?

Makes the process of managing users register/log in activities easier.

How?

In order to be able to register a new user or to log in into ODS Dataspace as already registered ODS user, you need to:

When the above is done, you can perform the following activities in ODS:

Examples

Prerequisites

Steps for Configuring Twitter Consumer Key and Secret

1 -- Get Twitter Client ID key and secret for use with ODS
  1. Browse to <https://dev.twitter.com/apps> and enter your Twitter use credentials:







  2. Click on Create a new application:



  3. In the presented form:
    1. Enter a name for your Twitter client application to be known by, e.g., "MyTwitterExample";
    2. Enter a description, e.g., "My Twitter Example Application";
    3. Enter website, e.g., http://example.com/;
    4. Provide a Callback URL -- Enter in "Callback URL" your ODS site URL that should match the host of the ODS installation. For ex. if ODS runs at http://example.com/ods/ then the URL in the Facebook app should be http://example.com.com/ :
    5. Click "Yes, I agree";
    6. Fill in the "CAPTCHA" field;











  4. Click "Create your Twitter application".
  5. The application should be registered and you will be shown a Consumer Key and Consumer Secret for the newly registered application. (You can copy these now, or come back for them later; they will also show up on the OAuth tool" tab. Do be aware that you will need these in the steps that follow.):







2 -- Configure ODS to use your Twitter Consumer Key and Secret
  1. Browse to your Virtuoso + ODS instance, http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>, and click Sign In.



  2. Log in as a Virtuoso+ODS user with Administrator privileges, e.g., dba.



  3. Click on Site Settings:



  4. Click on Login Authentication Keys:



  5. Select TwitterAPI in the API Name menu, provide the Consumer Key and Consumer Secret from the new Twitter application you created above, and click Add.



  6. ODS is now configured to use Twitter.



Example for Configuring regular ODS user to log in into ODS using Twitter Account credentials

Here is a sample scenario how to configure a regular ODS user to be able to log in in its ODS Dataspace using his/her own Twitter Account:

  1. Browse to your Virtuoso + ODS instance, http://<cname>[:<port>]/ods, e.g., <http://example.com/ods/>.



  2. Log in as a Virtuoso+ODS user with normal privileges, e.g., demo.



  3. Go to Profile Edit->Personal->Online Accounts:



  4. Click "Add":



  5. In the presented form select service Twitter. By default the "Member Home Page URI" has value http://twitter.com/<your-ODS-user-name> and the "Account URI" has value http://twitter.com/<your-ODS-user-name>#this . You need to change the <your-ODS-user-name> from these URLs with your Twitter account name.
  6. Click the "Link" button from "Action" column:



  7. Finally click "Save".
  8. Log out from ODS DataSpace.
  9. Make sure Twitter Login is enabled from admin user available at Site Settings -> Members Registrations:



  10. Click Sign In:
  11. Go to "Twitter" tab:



  12. Click "Twitter Login"
  13. Twitter should ask you to for authorization for the created application from above:



  14. Click "Sign In" in the Twitter form
  15. On a successful authorization you should be redirected back to the ODS DataSpace and should be logged in as the regular user from above, e.g: user "demo".



Related