About the facebook javascript sdk -
i newbie in coding. when called below function post on wall. encouunter error occured alert box. have search web few days still cannot find result , fix. facebook documentation bad. please help. call fb.ui, or fb.getloginstatus no problem. have problem of calling fb.api.
function posttowall() {      var body = 'reading js sdk documentation';      fb.api('/me/feed', 'post', { message: body }, function(response) {        if (!response || response.error) {         // alert('error occured');        } else {         // alert('post id: ' + response.id);        }      });      fb.api('/me', function(response) {       // console.log(response);      }); } the error message is-
an active access token must used query information current user.
the error quite straight-forward. no user logged-in application. must call, fb.login first before making api calls further. 
after login, user in session , wont see error again.
Comments
Post a Comment