简体   繁体   English

Facebook iOS SDK:如何向测试用户发送状态发布消息?

[英]Facebook iOS SDK: How do I send a status post message to a test user?

I've created a test user with the instructions here . 我已经按照此处的说明创建了一个测试用户。

How do I send a status post request to this test user account? 如何向此测试用户帐户发送状态发布请求?

I tried logging in as this test user under Settings . 我尝试在“设置”下以该测试用户身份登录。 I can log in successfully. 我可以成功登录。
But when I click on the Log in with Facebook button in my app, Facebook returns an error saying 但是,当我在应用程序中单击“ 使用Facebook登录”按钮时,Facebook返回错误,提示

The Facebook server could not fulfil this access request: Invalid application 123xxxx Facebook服务器无法满足此访问请求:无效的应用程序123xxxx

As i understand from your question there are 2 different problems here. 从您的问题中我了解到,这里有2个不同的问题。

First , you want to use your account to post to a testUser wall. 首先 ,您想使用您的帐户发布到testUser墙上。 Try this: 尝试这个:

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"somekey", @"someobject" nil];

[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed", testUserFbId] // here you set in whose post you wanna do the action, in this case it is yourself
                                 parameters:params
                                 HTTPMethod:@"POST"
                          completionHandler:^(FBRequestConnection *connection,
                                              id result,
                                              NSError *error) { /* Your code here */ }

Second , you can't login to your app using testUser account. 其次 ,您无法使用testUser帐户登录到您的应用程序。 This is a broader problem, and could have many causes. 这是一个更广泛的问题,可能有很多原因。

  • Check your .plist file to see if the is any error on fbId or any of the configurations for facebook. 检查您的.plist文件,以查看fbId或facebook的任何配置是否有错误。
  • Check on facebook if your application is configured correctly. 在facebook上检查您的应用程序是否配置正确。
  • Remember that if your application is in sandbox mode only users allowed can see posts. 请记住,如果您的应用程序处于沙盒模式,则只有被允许的用户才能看到帖子。
  • Also, can you log in with your own user? 另外,您可以使用自己的用户登录吗?

Let me know if i am on the right path here. 让我知道我是否在正确的道路上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM