Currently we do not have any API to allow autopost to social media, but I will explain how it work when you click social button from backend blog listing page, you can check my attached screenshot below which place i mentioned.
When you click share button from the dialog, it will go to this blogs controller php file.
JoomlaRootFolder/administrator/components/com_easyblog/controllers/blogs.php (function autopost())
When it call following autopost function, it will go to post library.
$post = EB::post($id);
$post->autopost($oauth->type, true);
This is post library php file -> JoomlaRootFolder/administrator/components/com_easyblog/includes/post/post.php then it will call this function
autopost()
Then you will see it will call this following method to proceed autopost :
EB::autoposting()->shareSystem($this, $type, $force);
The file is located at
JoomlaRootFolder/administrator/components/com_easyblog/includes/autoposting/autoposting.php (function shareSystem())
After that it will call this push method.
$table = EB::table('OAuth');
$table->load(array('type' => $type, 'system' => 1));
// Push the item now
$table->push($post);
This method is located at this file
JoomlaRootFolder/administrator/components/com_easyblog/tables/oauth.php (function push())
This is the part get all the post data and send to Facebook.
// Now we do the real thing. Get the library and push
$lib = EB::oauth()->getClient($this->type, $key, $secret, $callback);
$lib->setAccess($this->access_token);
// Try to share the post now
$state = $lib->share($post, $this);
That share method is located at this file ->
JoomlaRootFolder/administrator/components/com_easyblog/includes/oauth/adapters/facebook/client.php
And the Facebook API is located at this file ->
JoomlaFolder/administrator/components/com_easyblog/includes/oauth/adapters/facebook/base_facebook.php
Hope this will help.