William Russell
William Russell

Reputation: 63

Facebook OAuth Yii Framework CrungeConnector

I'm running the Yii-Framework and trying to use facebook login. I'm fairly new to programming in general and this is for educational purposes.

I've followed everything in his guide https://github.com/christiansalazar/crugeconnector and everything seems to be connected.

When I finally try to login with facebook I'm getting this error.

Error 500 file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=removed_for_this_post&redirect_uri=http%3A%2F%2Flocal.example.mysite.com%2Fquality%2Ffacebook-callback.php&client_secret=removed_for_this_post&code=removed_for_this_post): failed to open stream: HTTP request failed! HTTP/1.1 400

The callback php file code looks liek this

$url = "index.php?r=/site/crugeconnector&crugekey=facebook&crugemode=callback";

// common code:
foreach($_GET as $key=>$val)
    $url .= "&".$key."=".urlencode($val);
header("Location: ".$url);

I have also added my http://example.mysite.com/test/facebook-callback.php inside of my facebook app.

I've been looking at this for about 14 hours, any help would be appreciated

Upvotes: 0

Views: 148

Answers (1)

William Russell
William Russell

Reputation: 63

Needed to disable Native or desktop app.

The option: "Native or desktop app?" "Enable if your app is a native or desktop app" This needs to be disabled.

Upvotes: 0

Related Questions