I'm using Facebook Connect on a website.
I login the user. I ask for publish_stream, user_about_me among other permissions
Using JS SDK FB.login function, I check response.authResponse object and then post through jQuery Ajax the following data to a separate php file for processing:
- response.authResponse.accessToken
- response.authResponse.userID
The process.php file gets these parameters through $_POST and saves uid, token, name, etc. into a database.
https://graph.facebook.com/$uid?access_token=$token
Then in same file I try to exchange his user token for an extended one
https://graph.facebook.com/oauth/access_token?client_id=$appid&client_secret=$appsecret&grant_type=fb_exchange_token&fb_exchange_token=$token
I don't know what's wrong but I get the following

Is there any way to solve this?
Thanks