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

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -