i want to get count of likes on a facebook page using javascript SDK. i am using...
FB.api(
"/pageID/likes",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
returns: {message: "An access token is required to request this resource.", type: "OAuthException", code: 104,…}
How to get access token? Thanks in Advance!
This link can help you. When you use an API you always need to have a token to be allowed to request it. Facebook have a platform to sign-in and get a token. Facebook have a full documentation here.