I used to have this working and I do have it working for all other social logins.
I have a site that makes use of GTranslate and all subdomains refer to foreign languages. For example, my main English site is at drinkedin.net and Spanish would be at es.drinkedin.net
I have a wildcard SSL certificate, so that's all covered.
GTranslate handles the subdomains and translates the content on the fly via reverse proxies.
What I do is the following. For example, in \components\com_jfbconnect\libraries\provider\facebook.php, I edit the following:
// Check that additional scope for a user exists. If not, reroute them through Facebook login to obtain it
public function fetchNewScope($newScope)
{
$params = array();
$params = implode(',', $newScope);
if(isset($_SERVER))
$returnBase = "http://" . $_SERVER . ".drinkedin.net/";
else
$returnBase = "
drinkedin.net/";
$params = $returnBase . 'index.php?option=com_jfbconnect&task=authenticate.callback&provider=facebook';
$redirect = $this->client->getLoginUrl($params);
JFactory::getApplication()->redirect($redirect);
}
Notice how the redirect_uri preserves the subdomain. In the facebook.php file, I patch this in 3 places. In twitter.php and oauth2.php, I patch it each in one place.
All non-Facebook social logins (using either Twitter or Oauth2) work just fine. In the case with Facebook, I get the error message "We were unable to get information Facebook account. Please try again." for all foreign language subdomains (although English works just fine).
Regarding FB app permissions, I've added all subdomains to the "App Domains" portion of the FB App Settings.
Why won't this work?
Suggestions?