Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have used https://developers.facebook.com/docs/plugins/like-button for generating like button. But like button provided by developer facebook is for only page. I want to implement like functionality for particular post using facebook c# sdk.

I write below code -
C#
dynamic userTokenResult = client.Get("oauth/access_token", new
{
    client_id = strAppID,
    client_secret = strSecret,
    grant_type = "client_credentials"
});
dynamic res = client.Post("me/og.likes", new
{
    @object = "https://www.facebook.com/yourpagename/photos/photoid/?type=3&theater"
});


I am getting below error -
(OAuthException - #2500) An active access token must be used to query information about the current user.

Can you please help me on this?
Posted
v3
Comments
Patrice T 24-Nov-15 4:09am    
Contact facebook or a user forum.
It look like a security feature to prevent unknown people or bots from collecting personal informations.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900