简体   繁体   English

访问Facebook时,如何解决OAuthException 100要求用户会话错误?

[英]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.

相关问题 使用Facebook Sharp SDK创建自定义对象时出现OAuthException#100 - OAuthException #100 when creating custom object with facebook sharp SDK 使用Facebook C#SDK发布到Facebook页面时,我怎么突然开始收到OAuthException - How come I suddenly start receiving OAuthException when posting to facebook page using facebook c# SDK Facebook(OAuthException - #100)尝试在节点类型(AnonymousUser)上访问不存在的字段(first_name) - Facebook (OAuthException - #100) Tried accessing nonexisting field (first_name) on node type (AnonymousUser) 如何解决(OAuthException-#190)验证访问令牌时出错:这可能是因为用户已注销,或者是由于系统错误 - How to resolve (OAuthException - #190) Error validating access token: This may be because the user logged out or may be due to a system error 使用HttpClient时如何解决302错误? - How do I resolve 302 Error when using HttpClient? (OAuthException)在Facebook C#SDK上验证带有动态用户= FbApp.Get(“ me”)的访问令牌时出错 - (OAuthException) Error validating access token w/dynamic user = FbApp.Get(“me”) on Facebook C# SDK Facebook c# sdk 错误 OAuthException - #2 - Facebook c# sdk error OAuthException - #2 我该如何解决该错误? - How do I can to resolve this error? 如何解决此集合修改错误? - How do I resolve this Collection Modified Error? C#facebook sdk:(OAuthException-#100)(#100)GK中的应用程序只需通过TOS检查 - C# facebook sdk : (OAuthException - #100) (#100) Apps in the GK only need to pass TOS check
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM