How to use the access token after I get it with javascript ( response.authResponse.accessToken ) ?
I want that everyone can send a message to a friend ( even after logged out from facebook ).
EDIT:
I have just tryed this code but it doesn’t work:
FB.api('/me?access_token=AAACZBLSe4fcoBAFcGMJZAUS9OthIr5o6ZCUySgXYj0nfWX7u08X7h0VZAFFuJJs9LmeWgud2u5ZCEZCeUHZCVIq1Y2j4gjKAjJ0gx5OY9PBihlABJn64njm', function(response) { });
function sendRequestto() {
FB.ui({
method: 'send',
name: 'hello',
to: '100000497530558',
description: 'yuhuuuuuuu'
});
}
and in the body:
<input type="button" onclick="sendRequestto(); return false;" value="sendRequestto" />
Like this:
There is no need to use the access token explicitly. The API does that for you.