Phonegap + JQuery get function not working
I have a problem whit jQuerys get function and phonegap on android. I'm
try to create an application which catches events from a public facebook
page. I don't want the user to login. so i generate a access token with
the app id and app secret.
the code looks like that:
$.get('https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=2758301restofid&client_secret=71018456ed8d1restofsecret',
function(token) {
var accesstoken = token;
alert(accesstoken);
$url =
'https://graph.facebook.com/135874803089964?fields=events.fields(cover,name,description,start_time)&'+
accesstoken;
after that i use getJSON to read the $url and create the page content.
On Pc it just works fine. I also tryed to put my www folder on my
webserver and teted that on my android device which wokrs also fine.
But when i wrap it with Phonegap the alert(accesstoken); is always empty.
So i think that the get function does not work probably.
Thanks Simon
No comments:
Post a Comment