user3146172
user3146172

Reputation: 3

Facebook C# SDK AccessToken

I'm new to develop application to Facebook, we need a website page that shares on a Facebook page, only the admin of the page how can share on it, but i have undesired scenario that happened. what i made: 1- requesting code from Facebook at page load, then getting access token as this access token is expired after 2 h within those 2 h the user can log out from Facebook and try to share it will share, also if he logged in using another account that is not admin it will share on Facebook as the application still see a valid access token, i tried to fix it by getting a new access-token each time the share button is pressed but i get another undesired scenario which is at every click on share button it will refresh the page and get new code" as it doesn't used twice " and then get a new access token even if the user wants to make just multiple shares.

My question: their is a away to check if this access-token is valid to the current logged in user on Facebook?

Upvotes: 0

Views: 121

Answers (1)

Manjula D
Manjula D

Reputation: 57

Kinldy login your FB Account and go to develoeps.facebook.com . Click the tools->Graph Explorer and paste your access token in the Textbox.Click the debug button the validity of your code wiil be shown.Try to go with 60 days token.Then you can able to test your app continously with out changing accesstoken.Refer this link for further details. https://developers.facebook.com/docs/facebook-login/access-tokens

Upvotes: 2

Related Questions