You are here

README.txt in LinkedIn Integration 7

Same filename in this branch
  1. 7 README.txt
  2. 7 linkedin_auth/README.txt
  3. 7 linkedin_status/README.txt
  4. 7 linkedin_profile/README.txt
Same filename and directory in other branches
  1. 6 README.txt
=== LINKEDIN INTEGRATION ===

Maintainers:  Pascal Morin (bellesmanieres) Greg Harvey (greg.harvey) David
Landry (davad) Kyle Mathews (kyle_mathews)

see http://drupal.org/node/919412

/*********************************************
Installation/initial configuration

   1. LinkedIn Integration requires the OAuth.php library. You can either :
          * install the Oauth module from http://drupal.org/project/oauth (7.x-3.x). You don't need to
            activate it, the module only uses the library it provides.
          * download the OAuth.php library from http://code.google.com/p/oauth/ and
            specify the full path on the module admin interface
   2. Enable the base Linkedin module as usual.
   3. Request an API key by registering at
https://www.linkedin.com/secure/developer and creating a new application. Fill
the required fields (name, etc) and pay attention to
          * provide an "Integration URL" : this field must match the URL of your
            server. This means you'll need a separate key for each stage or
            development server.[@todo : is this still true ?]
          * leave the "Callback URL" blank, the module takes care of this.
   4. Configuration : go to admin/config/services/linkedin and fill the "API key" and
"Secret key" fields with the keys you got from
https://www.linkedin.com/secure/developer. If you downloaded the library
directly from http://code.google.com/p/oauth/, you should see an additional
"OAuth library full path" field above : don't forget to include the filename.
   5. Usage : Users will have to associate their LinkedIn account with their local
Drupal account (at user/%user/edit/linkedin) to use any functionality provided
by submodules.


/*********************************************
Troubleshooting

If you encounter problems, please check the following points :

    * Integration URL : integration url you gave at
      https://www.linkedin.com/secure/developer is the actual one from which you
      are issuing the request.
    * Callback URL : do not specifiy a callback url at
      https://www.linkedin.com/secure/developer.
    * Server time : an out of sync server will issue a wrong timestamp. Linkedin.com
      requires that the timestamp must be within 5 minutes of accurate.
    * Permissions : make sure users have the right to use the features provided by
      the submodule you are trying to use.

Also, the module offers a "debug mode" (see admin/config/services/linkedin) that will
try to give useful info.


/*********************************************
Developer use

If you want to implement you own module, you can use the following :

<?php linkedin_get_profile_fields($uid, $fields = array ()) ?>
Fetch fields from a LinkedIn profile. Copes with public/private LinkedIn profile
depending on the currently logged in user.
Parameters :
 $uid : the uid of the Drupal user.
 $fields : an array of field's names to retrieve (see
http://developer.linkedin.com/docs/DOC-1061 for a extensive list)
Return value : A structured array of fields and their values (or the error message
received from the API as an array)

<?php linkedin_get_fields($url, $tokens) ?>
Fetch fields from a LinkedIn profile.
Parameters :
 $url : full request url to a LinkedIn API ressource (see
API doc for syntax)
 $tokens : the user tokens, as an array containing keys 'token_key' and
 'token_secret' with their value
Return value : A structured array of fields and their values (or the error message
received from the API as an array)

<?php linkedin_put_profile_field($uid, $body, $field = 'current-status') ?>
Let us 'put' data into user profile.
Parameters :
 $uid : the uid of the user we want to access
 $body : The content to be sent.
 $field : the field we want to update. Currently, only 'current-status' is
 available from the API.
Return value : http answer from the API (or the error message as an array)

<?php hook_linkedin_user_settings_page($form_state, $account) ?>
Let modules add their form elements to the user preferences edit form at
user/%user/edit/linkedin. Must return an array of form elements.

<?php hook_linkedin_admin_page() ?>
Let modules add their form elements to the admin settings at admin/config/services/linkedin.
Must return an array of form elements.

<?php hook_linkedin_user_edit_perms() ?>
Mainly useful only if you don't use any of the bundled sub-modules. This function
is called from the access callback at user/%user/edit/linkedin to check if the user
has the right to access his own LinkedIn setting! It returns an array of permissions,
typically the return would be the same as the one from your hook_perm().
Note that user is granted access if he has any permission implemented by a module using
this hook. That means you cannot deny access through this function and must make checks
in hook_linkedin_user_settings_page if you want to be selective on what to display
to the user.

File

README.txt
View source
  1. === LINKEDIN INTEGRATION ===
  2. Maintainers: Pascal Morin (bellesmanieres) Greg Harvey (greg.harvey) David
  3. Landry (davad) Kyle Mathews (kyle_mathews)
  4. see http://drupal.org/node/919412
  5. /*********************************************
  6. Installation/initial configuration
  7. 1. LinkedIn Integration requires the OAuth.php library. You can either :
  8. * install the Oauth module from http://drupal.org/project/oauth (7.x-3.x). You don't need to
  9. activate it, the module only uses the library it provides.
  10. * download the OAuth.php library from http://code.google.com/p/oauth/ and
  11. specify the full path on the module admin interface
  12. 2. Enable the base Linkedin module as usual.
  13. 3. Request an API key by registering at
  14. https://www.linkedin.com/secure/developer and creating a new application. Fill
  15. the required fields (name, etc) and pay attention to
  16. * provide an "Integration URL" : this field must match the URL of your
  17. server. This means you'll need a separate key for each stage or
  18. development server.[@todo : is this still true ?]
  19. * leave the "Callback URL" blank, the module takes care of this.
  20. 4. Configuration : go to admin/config/services/linkedin and fill the "API key" and
  21. "Secret key" fields with the keys you got from
  22. https://www.linkedin.com/secure/developer. If you downloaded the library
  23. directly from http://code.google.com/p/oauth/, you should see an additional
  24. "OAuth library full path" field above : don't forget to include the filename.
  25. 5. Usage : Users will have to associate their LinkedIn account with their local
  26. Drupal account (at user/%user/edit/linkedin) to use any functionality provided
  27. by submodules.
  28. /*********************************************
  29. Troubleshooting
  30. If you encounter problems, please check the following points :
  31. * Integration URL : integration url you gave at
  32. https://www.linkedin.com/secure/developer is the actual one from which you
  33. are issuing the request.
  34. * Callback URL : do not specifiy a callback url at
  35. https://www.linkedin.com/secure/developer.
  36. * Server time : an out of sync server will issue a wrong timestamp. Linkedin.com
  37. requires that the timestamp must be within 5 minutes of accurate.
  38. * Permissions : make sure users have the right to use the features provided by
  39. the submodule you are trying to use.
  40. Also, the module offers a "debug mode" (see admin/config/services/linkedin) that will
  41. try to give useful info.
  42. /*********************************************
  43. Developer use
  44. If you want to implement you own module, you can use the following :
  45. Fetch fields from a LinkedIn profile. Copes with public/private LinkedIn profile
  46. depending on the currently logged in user.
  47. Parameters :
  48. $uid : the uid of the Drupal user.
  49. $fields : an array of field's names to retrieve (see
  50. http://developer.linkedin.com/docs/DOC-1061 for a extensive list)
  51. Return value : A structured array of fields and their values (or the error message
  52. received from the API as an array)
  53. Fetch fields from a LinkedIn profile.
  54. Parameters :
  55. $url : full request url to a LinkedIn API ressource (see
  56. API doc for syntax)
  57. $tokens : the user tokens, as an array containing keys 'token_key' and
  58. 'token_secret' with their value
  59. Return value : A structured array of fields and their values (or the error message
  60. received from the API as an array)
  61. Let us 'put' data into user profile.
  62. Parameters :
  63. $uid : the uid of the user we want to access
  64. $body : The content to be sent.
  65. $field : the field we want to update. Currently, only 'current-status' is
  66. available from the API.
  67. Return value : http answer from the API (or the error message as an array)
  68. Let modules add their form elements to the user preferences edit form at
  69. user/%user/edit/linkedin. Must return an array of form elements.
  70. Let modules add their form elements to the admin settings at admin/config/services/linkedin.
  71. Must return an array of form elements.
  72. Mainly useful only if you don't use any of the bundled sub-modules. This function
  73. is called from the access callback at user/%user/edit/linkedin to check if the user
  74. has the right to access his own LinkedIn setting! It returns an array of permissions,
  75. typically the return would be the same as the one from your hook_perm().
  76. Note that user is granted access if he has any permission implemented by a module using
  77. this hook. That means you cannot deny access through this function and must make checks
  78. in hook_linkedin_user_settings_page if you want to be selective on what to display
  79. to the user.