Ivan,
Sorry for the delay in getting back to this. You've changed the text it looked like since we started looking into this, but I'll answer what's above and some of the other issues you're having.
For the logging off issue, please try to add the following code to the components/com_jfbconnect/libraries/facebook.php file in the 'api' function:
if (!$callAsUser)
$params['access_token'] = $this->facebookAppId . "|" . $this->facebookSecretKey;
else if (!$params || (is_array($params) && (!array_key_exists('access_token', $params))))
{
// Get the access token for the current user
$jUser = JFactory::getUser();
$userMapModel = new JFBConnectModelUserMap();
$userMapModel->getData($jUser->get('id'));
$accessToken = $userMapModel->_data->access_token;
if ($accessToken != '' && $accessToken != null)
$params['access_token'] = $accessToken;
}
There (I believe) is already the !callAsUser statement, you need to add the else if portion.
In v4.2.3, we should be saving the access token to the database and that should work. The issue is that Facebook's library will try to refetch the token in certain cases, and AJAX calls seem to be one when we bypass some other stuff.
As for the feedPost Javascript, that should be in your jfbconnect.js file as well. I don't think there's been any changes to that code from 4.2.0 when it was introduced, but you can check our jfbconnect.js file we load on this site (from v4.2.4) and just copy it into your jfbconnect.js file if there are any differences.
Hope that helps, and sorry for the delay. Hopefully that will resolve your token issue, but if now, let us know.
Thanks,
Alex