Loading...
 
Features / Usability

Features / Usability


Re: Social Login unable to auto create user

posts: 400

Try this:

Replace this (around lines 221 - 230 in lib/socialnetworkslib.php):

Copy to clipboard
// try cURL $url = 'https://graph.facebook.com' . $url; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $ret = curl_exec($ch); curl_close($ch);


With this:

Copy to clipboard
// try ZendOAuth $this->options['callbackUrl'] = $this->getURL(); $this->options['requestTokenUrl'] = 'https://graph.facebook.com/' . $this->graphVersion . '/oauth/access_token'; $consumer = new ZendOAuth\Consumer($this->options); $httpClient = TikiLib::lib('tiki')->get_http_client(); $consumer->setHttpClient($httpClient); $customServiceParameters = [ 'client_id' => $prefs['socialnetworks_facebook_application_id'], 'client_secret' => $prefs['socialnetworks_facebook_application_secr'], 'redirect_uri' => $this->getURL(), 'code' => $_REQUEST['code'] ]; /** @var ZendOAuth\Token\Request $token */ $token = $consumer->getRequestToken($customServiceParameters); $resp = $token->getResponse(); $ret = $resp->getContent();
There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting