Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook iOS SDK error when requesting user info
    primarykey
    data
    text
    <p>I'm working on an iPhone application and part of it relies on Facebook integration. I downloaded version 3.1 of the SDK from the website and followed the first tutorial, found at this link: <a href="https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/authenticate/" rel="nofollow">Authenticate</a>.</p> <p>I'm using iOS 6.0.1 on an iPhone 4 and Xcode 4.5.</p> <p>Although the login works fine, when following the steps <a href="https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/personalize/" rel="nofollow">here</a> in order to request basic user information, the application gives the following error:</p> <pre><code>2013-01-01 23:13:57.966 AppName[8691:907] Error: HTTP status code: 400 2013-01-01 23:13:57.977 AppName[8691:907] FBSDKLog: Response &lt;#1111&gt; &lt;Error&gt;: The operation couldn’t be completed. (com.facebook.sdk error 5.) </code></pre> <p>This is the code I'm using to request the information:</p> <pre><code>if (FBSession.activeSession.isOpen) { [FBSettings setLoggingBehavior:[NSSet setWithObjects: FBLoggingBehaviorFBRequests, nil]]; [[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary&lt;FBGraphUser&gt; *aUser, NSError *error) { if (!error) { NSLog(@"%@", [[FBSession activeSession] accessToken]); userProfileImage.profileID = aUser.id; self.user = [[User alloc] initWithName:aUser.name andLocation:[aUser.location objectForKey:@"name"]]; [self.user saveUser]; [nameTextField setText:[self.user getName]]; [locationTextField setText:[self.user getLocation]]; } }]; } </code></pre> <p>The weird part is that the FBRequest works in the simulator. I checked the access token and I get one on the iPhone too.</p> <p>One other thing that might be important: On the simulator the application redirects to the Facebook website where it gets authorized(I can view it in my app list on Facebook). On the other hand, when logging in from the device, I only get a standard alert the first time I login and the app doesn't get added on Facebook.</p> <p><em>P.S.: This is my first question, so I apologize for the amount (or lack) of information. Thank you in advance for helping me out!</em></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload