简体   繁体   中英

Facebook image upload on a page working properly in simulator but not in device

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;
}}

"

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.

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]);
};

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

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