I'm trying to learn how to get an application access token from Facebook for my app.
I'm sending a jquery reguest (in the firebug console) based on the data specified here (http://developers.facebook.com/docs/authentication/#client_credentials).
I seem to get the response ( access_token = 'my_app_id|'+the_app_token ) but firebug sends a error => 'the response i get'+'is not defined'. feel like I'm missing something very simple here? how can I avoid this error and get the response?
params = {};
params['grant_type']= 'client_credentials'
params['client_id'] =app_id;
params['client_secret'] = client_secret;
$.ajax({
url: 'https://graph.facebook.com/oauth/access_token',
type:'GET',
dataType: 'jsonp',
data:params,
success: function(response){
resp = response;
}
});