Update User Status

Hybridauth provides a way to updates users statuses across the social APIs supporting this feature.

If a provider does not support this feature, Hybridauth will throw an exception NotImplementedException. To know more about providers capabilities, refer to Supported Providers .

Twitter example :

// Instantiate Twitter Adapter.
$twitter = new Hybridauth\Provider\Twitter($config);

// Authenticate the user.
$twitter->authenticate();

// Update the user status.
$twitter->setUserStatus([
    'status' => 'Hello world!',
    'picture' => 'https://example.com/logo.png',
]);

Tumblr example :

// Instantiate Tumblr Adapter.
$tumblr = new Hybridauth\Provider\Tumblr($config);

// Authenticate the user.
$tumblr->authenticate();

// Post a blog post.
$tumblr->setUserStatus("Hello world!");

Facebook example (Deprecated since August 1, 2018) :

// Instantiate Facebook Adapter.
$facebook = new Hybridauth\Provider\Facebook($config);

// Authenticate the user.
$facebook->authenticate();

// Update the user status.
$facebook->setUserStatus([
    'message' => 'Hello world!',
    'link' => 'https://example.com/link/to/page',
]);

As of April 18, 2017, the (picture, name, caption, description) parameters are no longer supported by Graph API versions 2.9 and higher. As solution, you can add OG tags to page which is going to be posted like this: ```html

```

More info here: https://developers.facebook.com/docs/sharing/webmasters/


LinkedIn example :

LinkedIn supports few extra parameters when posting a new user status:

// Instantiate LinkedIn Adapter.
$linkedin = new Hybridauth\Provider\LinkedIn($config);

// Authenticate the user.
$linkedin->authenticate();

// Update the user status.
$profile = $linkedin->getUserProfile();
$linkedin->setUserStatus('Check out developer.linkedin.com!', $profile->identifier);