Options

Again UniqueID is required. Facebook oauth login problem.

myemye New
edited September 2014 in Vanilla 2.0 - 2.8

I've got the same problem as discussed before but I can't solve it

vanilla 2.1.1
Tried:
1. * Facebook dev app - not in sandbox mode and set in website mode with urls
2. * correct values of Application ID & Application Secret
3. * checked php enabled cUrl, enabled OpenSSL
4. * updated in class.facebook.plugin.php as said here

public function GetProfile($AccessToken) {
      $Url = "https://graph.facebook.com/me?access_token=$AccessToken";
//      $C = curl_init();
//      curl_setopt($C, CURLOPT_RETURNTRANSFER, TRUE);
//      curl_setopt($C, CURLOPT_SSL_VERIFYPEER, FALSE);
//      curl_setopt($C, CURLOPT_URL, $Url);
//      $Contents = curl_exec($C);
//      $Contents = ProxyRequest($Url);
      $Contents = $this->file_get_contents_curl($Url);
      $Profile = json_decode($Contents, TRUE);
      return $Profile;
   }
    function file_get_contents_curl($url) {
    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
    curl_setopt($ch, CURLOPT_URL, $url);

    $data = curl_exec($ch);
    curl_close($ch);

    return $data;
  }

Still got that UniqueID is required.

I'm stuck.

Tagged:

Comments

Sign In or Register to comment.