4

When I run same code in simulator I get success Response for image post:

    {
        id = 248572435289479;
        "post_id" = "244759709004085_248572441956145";
    }

When I run in same code in device I get:

Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x208a8dd0 {error={
    code = 1;
    message = "(#1) An unknown error occurred";
    type = OAuthException;
}}

"
tkanzakic
  • 5,499
  • 16
  • 34
  • 41
Venu Gopal Tewari
  • 5,672
  • 42
  • 41
  • 3
    i doubt on authorization on your device. first check facebook is properly working on your device then clean your build and remove previous app from device and ran you code on device. – Tirth Apr 15 '13 at 13:51
  • If there will be a problem with authorization then i should be unable to get access_token for page too.I am getting it successfully only problem is in image post on facebook page with device but all works in simulator. – Venu Gopal Tewari Apr 16 '13 at 06:05
  • see this http://stackoverflow.com/questions/4950337/getting-random-facebookerrdomain-error-10000. it may help you. – Tirth Apr 16 '13 at 06:20
  • No difference just another way to get Log message, One thing i would like to mention i make a status message post right now with same code with device and all worked fine.Problem is only with image post with Device only :( – Venu Gopal Tewari Apr 16 '13 at 07:10
  • Is the image you are trying to upload from the simulator and the device same? Is there a difference in size, format? – Hetal Vora Aug 07 '13 at 20:54
  • 2
    @VenuGopalTewari : error states that it is an "OAuthException", it simply means that it is authentication related error. try to do one thing, delete the app from facebook, logout from facebook in settings app in device, and then tryto authenticate using browser or Facebook app. Sometimes iOS6 facebook authentication behaves abnormally. if the error still persist then please post it here again – Vaibhav Gautam Aug 08 '13 at 18:16
  • @VenuGopalTewari : please check these http://stackoverflow.com/questions/5497302/facebookerrdomain-error-10000-when-calling-graph-api-facebook-ios and http://stackoverflow.com/questions/4950337/getting-random-facebookerrdomain-error-10000 hopefully that will work for you. – Trup Aug 12 '13 at 10:20
  • can you print your error more in detail? I mean instead of using [error localizedDescription] try with [error description] – Niru Mukund Shah Aug 13 '13 at 05:22
  • Come on @vipin, give that bounty out. –  Aug 13 '13 at 17:35

3 Answers3

2

OAuthException means that there was an authentication issue. Be sure that the following are true on your device.

  • You are logged into a facebook account successfully
  • If you are, then remove the app from the phone
  • Do a clean and re-deploy to the phone

If none of the above work, try logging out in Settings on the phone and logging back in. Then try logging in through safari. Sometimes the iOS facebook authentication can be a little buggy. Also try a different app that is guaranteed to work with iOS facebook accounts. Something like, Hootsuite.

If there is still an issue after all that... I am not sure what you tell you.

1

This link might help you.

and @giff's answer also explains it to some extent on this link.

log of your issue in this might help you to get further detail of your error.

- (void)request:(FBRequest *)request didFailWithError:(NSError *)error {
    NSLog(@"%@", [error localizedDescription]);
    NSLog(@"Err details: %@", [error description]);
};
Community
  • 1
  • 1
Baby Groot
  • 4,637
  • 39
  • 52
  • 71
1

I recommend you to try this if none of the solutions given above could help you.

Remove the application from the list of authorized applications and authorize it again with the needed permissions.

Hope this works for you

Niru Mukund Shah
  • 4,637
  • 2
  • 20
  • 34