Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
352 views
in Technique[技术] by (71.8m points)

Generate "never-expire" access token for Facebook Page

I have managed to post to Facebook Page via API (C#), but when administrator of the page logs out, the following error occurs:

"(OAuthException - #190) Error validating access token: The session is invalid because the user logged out."

How do I generate access token which is never expired?

I need a solution that doesn't open Facebook Login dialog.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can generate never expiring access token without coding, following this instructions:

  1. Open graph Explorer: https://developers.facebook.com/tools/explorer/.
  2. Choose your application from the right corner dropdown.
  3. From "Get Token" dropdown choose your Fan Page.
  4. Click on submit button to generate token.
  5. From the left side on "Search for a field" enter access_token and click submit again. Copy this token from the main window.
  6. Open https://developers.facebook.com/tools/debug/accesstoken and paste token here. Click "Debug".
  7. Click the button "Extend Access Token". This will generate never expiring token.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...