So, I'm trying to use the Graph API with the Facebook JS SDK, and I get the following error in Safari:
"OAuthException: access token should be used to request information about the current user.
I suspected that this was because Safari was very strict with the cookie settings for x-domain, so I tried it in Firefox with the option cookieset to false in FB.init(). I really found myself getting the same error for my queries FB.api().
FB.init({
appId: "<%= app_id %>",
status: true,
xfbml: true,
channelUrl: window.location.protocol + '//' + window.location.host + '/fb/canvas/channel.html'
});
So I'm wondering ... is there a good way to manually set the request parameter access_tokenin the request FB.api()?
If the cookie FB.init()is configured correctly, here is what the request parameters look like FB.api():
access_token xxxxxxxxxxxx|1.xxxxxxxxxxxxxxxxxxxxxx__.3600.xxxxxxxxxx-xxx|xxxxxxxxxxxxxxxxxxxxxxxxxxx
callback FB.ApiServer._callbacks.xxxxxxxxxxxxxxx
pretty 0
sdk joey
Safari ( cookie FB.init() ) FB.api() :
callback FB.ApiServer._callbacks.xxxxxxxxxxxxxxx
pretty 0
sdk joey
... , access_token ... , FB.api() access_token.