EasyBlogClientLinkedIn
extends LinkedIn
in package
Table of Contents
Constants
- _SHARE_COMMENT_LENGTH = 700
- _SHARE_CONTENT_DESC_LENGTH = 400
- _SHARE_CONTENT_TITLE_LENGTH = 200
- _URL_ACCESS_V2 = 'https://www.linkedin.com/oauth/v2/accessToken'
- _URL_API = 'https://api.linkedin.com'
- _URL_API_V2 = 'https://api.linkedin.com/v2'
- _URL_AUTH_V2 = 'https://www.linkedin.com/oauth/v2/authorization?response_type=code'
- _URL_REVOKE = 'https://api.linkedin.com/uas/oauth/invalidateToken'
- _USER_CONSTANT = 'LINKEDIN_USER_ID_'
Properties
- $apiKey : mixed
- $apiSecret : mixed
- $app : mixed
- $config : mixed
- $input : mixed
- $redirect : mixed
- $access_token : mixed
- $application_key : mixed
- $application_secret : mixed
- $callback : mixed
- $token : mixed
Methods
- __construct() : mixed
- checkResponse() : mixed
- Determine the response type from each API call
- checkStatusOfUpload() : mixed
- Method to check the status of the photo upload
- company() : mixed
- Method to retrieve company information
- emailAddress() : mixed
- API to retrieve user email address for Oauth V2
- getAccess() : mixed
- Exchanges the request token with the access token
- getAuthorizeURL() : mixed
- getCompanyLists() : mixed
- Method to retrieve lists of company that the user have
- getLoginButton() : mixed
- Retrieves the loggin button for Facebook
- getRequestToken() : mixed
- Retrieves the request token from the query
- getRevokeButton() : mixed
- Retrieves the revoke access button
- getUserEmail() : mixed
- Method to retrieve user email
- getUserIdFromState() : mixed
- getVerifier() : string
- Returns the verifier option. Since Facebook does not have oauth_verifier, The only way to validate this is through the 'code' query
- isThrottled() : mixed
- Determine if request is throttled by LinkedIn
- me() : mixed
- General user profile retrieval function
- processMessage() : mixed
- Method to process the message to be share to linkedin
- retrieveTokenAccess() : mixed
- Retrieve token access for oauth2 authentication
- revoke() : mixed
- Revoke application access
- revokeApp() : mixed
- Revokes the linkedin access
- setAccess() : mixed
- setAccessToken() : mixed
- Set access token required for API call
- setApplicationKey() : mixed
- Set application key
- setApplicationSecret() : mixed
- Set application secret
- setAuthCode() : mixed
- Set the authorization code
- setCallback() : mixed
- Sets the callback url / redirection url
- setCallbackUrl() : mixed
- Set callback url after authentication
- setRequestToken() : mixed
- Sets the request token
- share() : mixed
- Posts a message on linkedin
- sharePost() : mixed
- Method to share the post (version 2.0)
- sharePostLegacy() : mixed
- Method to share the post made in EB
- xmlToArray() : mixed
- Converts passed XML data to an array.
- fetch() : mixed
- General fetch method for all API call
- constructUserIdInState() : mixed
- getUser() : mixed
- Retrieves user's linkedin profile
- processMedia() : mixed
- Method to process the media properties for sharing
Constants
_SHARE_COMMENT_LENGTH
public
mixed
_SHARE_COMMENT_LENGTH
= 700
_SHARE_CONTENT_DESC_LENGTH
public
mixed
_SHARE_CONTENT_DESC_LENGTH
= 400
_SHARE_CONTENT_TITLE_LENGTH
public
mixed
_SHARE_CONTENT_TITLE_LENGTH
= 200
_URL_ACCESS_V2
public
mixed
_URL_ACCESS_V2
= 'https://www.linkedin.com/oauth/v2/accessToken'
_URL_API
public
mixed
_URL_API
= 'https://api.linkedin.com'
_URL_API_V2
public
mixed
_URL_API_V2
= 'https://api.linkedin.com/v2'
_URL_AUTH_V2
public
mixed
_URL_AUTH_V2
= 'https://www.linkedin.com/oauth/v2/authorization?response_type=code'
_URL_REVOKE
public
mixed
_URL_REVOKE
= 'https://api.linkedin.com/uas/oauth/invalidateToken'
_USER_CONSTANT
public
mixed
_USER_CONSTANT
= 'LINKEDIN_USER_ID_'
Properties
$apiKey
public
mixed
$apiKey
= \null
$apiSecret
public
mixed
$apiSecret
= \null
$app
public
mixed
$app
= \null
$config
public
mixed
$config
= \null
$input
public
mixed
$input
= \null
$redirect
public
mixed
$redirect
= \null
$access_token
protected
mixed
$access_token
= \null
$application_key
protected
mixed
$application_key
= \null
$application_secret
protected
mixed
$application_secret
= \null
$callback
protected
mixed
$callback
= \null
$token
protected
mixed
$token
= \null
Methods
__construct()
public
__construct([mixed $options = array() ]) : mixed
Parameters
- $options : mixed = array()
checkResponse()
Determine the response type from each API call
public
checkResponse(mixed $http_code_required, mixed $response) : mixed
Parameters
- $http_code_required : mixed
- $response : mixed
Tags
checkStatusOfUpload()
Method to check the status of the photo upload
public
checkStatusOfUpload(mixed $asset) : mixed
Parameters
- $asset : mixed
Tags
company()
Method to retrieve company information
public
company(mixed $options) : mixed
Parameters
- $options : mixed
Tags
emailAddress()
API to retrieve user email address for Oauth V2
public
emailAddress([mixed $options = '?q=members&projection=(elements*(handle~))' ]) : mixed
Parameters
- $options : mixed = '?q=members&projection=(elements*(handle~))'
Tags
getAccess()
Exchanges the request token with the access token
public
getAccess() : mixed
Tags
getAuthorizeURL()
public
getAuthorizeURL([mixed $redirect = null ][, mixed $triggerDefaultScope = false ]) : mixed
Parameters
- $redirect : mixed = null
- $triggerDefaultScope : mixed = false
getCompanyLists()
Method to retrieve lists of company that the user have
public
getCompanyLists(mixed $options) : mixed
Parameters
- $options : mixed
Tags
getLoginButton()
Retrieves the loggin button for Facebook
public
getLoginButton(mixed $return[, mixed $system = false ][, mixed $userId = false ]) : mixed
Parameters
- $return : mixed
- $system : mixed = false
- $userId : mixed = false
Tags
getRequestToken()
Retrieves the request token from the query
public
getRequestToken() : mixed
Tags
getRevokeButton()
Retrieves the revoke access button
public
getRevokeButton(mixed $return[, mixed $system = false ][, mixed $userId = false ]) : mixed
Parameters
- $return : mixed
- $system : mixed = false
- $userId : mixed = false
Tags
getUserEmail()
Method to retrieve user email
public
getUserEmail() : mixed
Tags
getUserIdFromState()
public
getUserIdFromState(mixed $state) : mixed
Parameters
- $state : mixed
getVerifier()
Returns the verifier option. Since Facebook does not have oauth_verifier, The only way to validate this is through the 'code' query
public
getVerifier() : string
Return values
string —$verifier Any string representation that we can verify it isn't empty.
isThrottled()
Determine if request is throttled by LinkedIn
public
isThrottled(mixed $response) : mixed
Parameters
- $response : mixed
Tags
me()
General user profile retrieval function
public
me([mixed $options = '?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))' ]) : mixed
Parameters
- $options : mixed = '?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))'
Tags
processMessage()
Method to process the message to be share to linkedin
public
processMessage(mixed $post) : mixed
Parameters
- $post : mixed
Tags
retrieveTokenAccess()
Retrieve token access for oauth2 authentication
public
retrieveTokenAccess(mixed $code) : mixed
Parameters
- $code : mixed
Tags
revoke()
Revoke application access
public
revoke() : mixed
Tags
revokeApp()
Revokes the linkedin access
public
revokeApp() : mixed
Tags
setAccess()
public
setAccess(mixed $access) : mixed
Parameters
- $access : mixed
setAccessToken()
Set access token required for API call
public
setAccessToken(mixed $token) : mixed
Parameters
- $token : mixed
Tags
setApplicationKey()
Set application key
public
setApplicationKey(mixed $key) : mixed
Parameters
- $key : mixed
Tags
setApplicationSecret()
Set application secret
public
setApplicationSecret(mixed $secret) : mixed
Parameters
- $secret : mixed
Tags
setAuthCode()
Set the authorization code
public
setAuthCode(mixed $code) : mixed
Parameters
- $code : mixed
Tags
setCallback()
Sets the callback url / redirection url
public
setCallback(mixed $url) : mixed
Parameters
- $url : mixed
Tags
setCallbackUrl()
Set callback url after authentication
public
setCallbackUrl(mixed $url) : mixed
Parameters
- $url : mixed
Tags
setRequestToken()
Sets the request token
public
setRequestToken(mixed $token, mixed $secret) : mixed
Parameters
- $token : mixed
- $secret : mixed
Tags
share()
Posts a message on linkedin
public
share(EasyBlogPost &$post, EasyBlogTableOAuth &$oauth[, mixed $system = true ][, mixed $reposting = false ]) : mixed
Parameters
- $post : EasyBlogPost
- $oauth : EasyBlogTableOAuth
- $system : mixed = true
- $reposting : mixed = false
Tags
sharePost()
Method to share the post (version 2.0)
public
sharePost(mixed $action, mixed $content[, mixed $private = true ][, mixed $twitter = false ][, mixed $company = false ]) : mixed
Parameters
- $action : mixed
- $content : mixed
- $private : mixed = true
- $twitter : mixed = false
- $company : mixed = false
Tags
sharePostLegacy()
Method to share the post made in EB
public
sharePostLegacy(mixed $action, mixed $content[, mixed $private = TRUE ][, mixed $twitter = FALSE ][, mixed $companies = array() ]) : mixed
Parameters
- $action : mixed
- $content : mixed
- $private : mixed = TRUE
- $twitter : mixed = FALSE
- $companies : mixed = array()
Tags
xmlToArray()
Converts passed XML data to an array.
public
xmlToArray(mixed $xml) : mixed
Parameters
- $xml : mixed
Tags
fetch()
General fetch method for all API call
protected
fetch(mixed $method, mixed $url[, mixed $data = NULL ][, mixed $parameters = array() ]) : mixed
Parameters
- $method : mixed
- $url : mixed
- $data : mixed = NULL
- $parameters : mixed = array()
Tags
constructUserIdInState()
private
constructUserIdInState() : mixed
getUser()
Retrieves user's linkedin profile
private
getUser() : mixed
Tags
processMedia()
Method to process the media properties for sharing
private
processMedia(mixed $content, mixed $company) : mixed
Parameters
- $content : mixed
- $company : mixed