简体   繁体   中英

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

The Facebook server could not fulfil this access request: Invalid application 123xxxx

As i understand from your question there are 2 different problems here.

First , you want to use your account to post to a testUser wall. 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. 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.
  • Check on facebook if your application is configured correctly.
  • 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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