[英]How do I resolve the OAuthException 100 Requires user session error when accessing Facebook?
I created my app and sent a request to Facebook with the following parameters: 我创建了我的应用,并使用以下参数向Facebook发送了请求:
facebookClient.AppId = APP_ID;
facebookClient.AppSecret = APP_SECRET;
facebookClient.AccessToken = APP_ACCESS_TOKEN;
However, when I try to get page statuses, I get the error: 但是,当我尝试获取页面状态时,出现错误:
OAuthException 100 Requires user session
OAuthException 100需要用户会话
What does this error mean? 这个错误是什么意思? How do I resolve it?
我该如何解决?
Using a Facebook C# SDK to get this error. 使用Facebook C#SDK来获取此错误。
The user that created this app has the manage_pages
permission on the page I want to get status updates from. 创建此应用的用户在我要从中获取状态更新的页面上具有
manage_pages
权限。
To query for the "page statuses", you need to pass the user_access_token
, not the app_access_token
. 要查询“页面状态”,您需要传递
user_access_token
,而不是app_access_token
。
The user access token is obtained at the authorization step. 在授权步骤获得用户访问令牌。 For eg:
例如:
//authorization
session = await App.FacebookSessionClient.LoginAsync("manage_pages");
string access_token = session.AccessToken;
string fb_id = session.FacebookId;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.