To initialize Publish class you need configuration array dedicated for selected service.
LinkedIn configuartion array should have the following keys:
LinkedIn application should be set on the page https://developer.linkedin.com/.
The 'app_key' value should be content of the field 'API Key' displayed in application details.
As 'app_secret' value should be set content of the field 'Secret Key' displayed in application details.
The application should require the following LinkedIn user permissions: 'r_fullprofile', 'r_emailaddress', 'rw_nus'. User access token must be obtained after accepting these permissions by user.
To use the module initialize Publish object for selected social service class with appropriate configuration array.
use Vegas\Social\LinkedIn\Publish; $config = array( 'app_key' => APP_ID, 'app_secret' => APP_SECRET, 'access_token' => USER_OAUTH_TOKEN ); $publish = new Publish($config);
Publish interface contains a set of unified methods for post configuration.
$publish->setMessage("Post text")->setTitle("Post title")->setLink("http://amsterdamstandard.com/");
A photo can be set by URL:
The post or picture currently set in the Publish object can be sent on user page in social service by method post().