I need to give an opportunity for my page's visitors to like the shown last post from facebook fanpage with no ready code and iframes prepared by facebook, beacause I need custom styles and elements. I actually use js API with facebook SDK. I was trying to post a like by FB.api() but I get only error codes in response with access_tokens. I was trying use all of the available tokens like user token, page token, client token and App token. Is there any way to solve that ?
Here is my code :
FB.api(
"/" + e.dataset.postid + "/likes",
"POST",
function (response) {
if (response && !response.error) {
}
}
);