AppCenter Rejection - missing (NOT) SSO - ios

I have a problem with App Center Review. I have an iOS application which has the Single Sign-On implemented (I just tested it on both types of devices). Still, when I submit my app's page for App Center Review I always get the same message (see screenshot below).
I don't know what to do anymore. It has been like this for at least few months now. I checked everything in my application, even was able to post an update in the meantime, and the page still get's rejected. The message is always the same so I don't get any more info about the error (which in my opinion does not exists).
What should I do with this issue? Who can I contact directly about it (via email preferably)?
Edit #1: In my opinion I am using the native login screen. I am 100% sure that I use official FB API (downloaded from FB page). When I connect with FB in my application the screen that pops up is a screen from FB application (see below).
Edit #2: Okay, so I've implemented new way of logging in with FB but still native login view is not presented. Instead, the login screen of FB application opens up, which is exactly the same behaviour as before... I have the FacebookDisplayName set in the .plist file.
[FBSettings setDefaultAppID:#"some_facebook_app_id"];
[FBSettings setDefaultUrlSchemeSuffix:#"some_suffix"];
[FBSession openActiveSessionWithReadPermissions:#[#"basic_info"] allowLoginUI:TRUE completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
// handler logic goes here
}];
Edit #3: yeap, the new API was the solution. Thanks!

Related

Login through FB Giving Error iOS Objective-C [duplicate]

Something must have changed recently on Facebook's servers regarding how they process login requests because this used to be working perfectly and suddenly stopped.
(We are using FBSDKLoginManager.loginBehavior = FBSDKLoginBehaviorWeb because of how our app is replicated for multiple brands (one codebase, many apps) and issues we ran into using the native login.)
Anyhow, this is what we see now when we try to present a login webview to the user (before it even lets them attempt to login):
(Not Logged In: You are not logged in. Please login and try again.)
This is the code we are using to present the login view:
NSString *const publish_actions = #"publish_actions";
FBSDKLoginManager* login = [FBSDKLoginManager new];
login.loginBehavior = FBSDKLoginBehaviorWeb;
[login logInWithPublishPermissions:#[publish_actions] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
[FBSDKAccessToken setCurrentAccessToken:result.token];
// ...
}];
Also note that this problem is not specific to iOS. Our Android app is seeing the same thing (and again it used to work fine until just recently).
I was having this same bug... seems as though the issue lies in your info.plist URL Scheme settings: Facebook SDK: app not registered as a URL Scheme
However, adding these leads to the app sending you off to the actual Facebook app for authentication, instead of showing the login modal in your own app.
** UPDATE **
Sorry, I spoke too soon... the above changes will help things out (or change the user flow in ways you don't want), but what really needed to happen (and this is the only thing), was just adding an "iOS Platform" (or other) to your app settings in the Facebook Developer portal. This is what did it for me anyways. :)

Facebook Share Dialog: Permission Error - OAuth "Facebook Platform" "insufficient_scope (#200) Permissions error"

My requirement is here:
Share to Facebook from my app using Open Graph Action - using Share Dialog (because I don't want special dialog for login)
I request publish permission, and upon obtaining it I try to share via Post dialog. Here is the brief code I use:
[FBRequestConnection startWithGraphPath:#"/MY_FB_APP_ID/app_link_hosts"
parameters:paramsForAppLinksHost HTTPMethod:#"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
NSString * appLinkHostURLID = [result objectForKey:#"id"]; // store this ID in an NSString
if(error)
{
NSLog(#"error = %#", error.description);
}
else
{
[self ShareToFB : appLinkHostURLID]; //Code to share OG story via Share Dialog
}
}];
However, above error gives me this:
com.facebook.sdk:HTTPStatusCode=403, com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 200;
message = "(#200) Permissions error";
type = OAuthException;
};
};
The problem with Facebook SDK is that there is so much documentation and almost no support that I haven't got my previous questions answered too (where I was trying to share without permission), and this problem simply doesn't yield.
Somebody please tell - Is having FB app approved by Facebook a REQUIREMENT for this to work perfectly? If so, how does one correctly provide app store ID when the app isn't even live on Apple store? They use it even in code for applinks related permissions (see above).
The crux of the issue is that everything works with developer facebook login perfectly but fails with another FB user. This means that all my plist and everything is OK. However the FB app isn't submitted (and for many valid reasons such as my iOS app is still in development - how can one be expected to submit screenshots and all even before app is live?)
Someone please help...
OK, I figured it out myself - like many other developers.
1 - This error is due to the fact that FB app isn't approved for certain permissions but still trying to use / request that permission from user. publish_action is one such permission.
2 - In order to test this, facebook app developer needs to approve test users from within develolper.facebook.com portal.
3 - This test user is located in your FB app portal under:
a) Status & Review -> Items under Review section
and
b) Roles section.
You (FB app administrator Developer) need to add the user in b), and not a).
Then the user needs to approve your request. And in order to do that, he needs to register himself as FB developer too.
So much for neat documentation...one can easily get lost.
The github samples and all are great, but none of them tells the whole picture.
Alas, they modify their error descriptions instead.

Facebook SDK iOS error 2

I'm trying to log into facebook with their API using
[FBSession openActiveSessionWithReadPermissions:permissions
allowLoginUI:YES
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
[self sessionStateChanged:session state:state error:error];
}]
The problem I'm having is in iOS 6.x when the device has a facebook account linked in the settings app it fails to log in. The error it gives is the seemingly one-size-fits-all error 2. This is the only case where it fails and I can't understand why. What is a solution to let me log in while an account is linked?
check that your permissions array does not contain the offline_access permission. this permission is now deprecated and has been known to cause login to fail. i previously searched stack overflow and found this answer. you'll also need to go into Settings -> Facebook and switch the permission on the Allowed Apps to On.
I was getting this error due to the app being sandboxed. Check facebook developer and add your team.
Go to settings. Scroll all the way down until you see Facebook on left hand side
tab, on it, allow these apps to use your account (right hand side).
Look for the app that gives you the sdk error 2.

Changing defaultAudience when sharing to a feed using Facebook IOS SDK

Using the IOS SDK for Facebook (3.1) , I find that once I set up my project, I am unable to change the default audience.
For instance, I set up my test project to publish to "Only Me". It works fine. I am working off of this example, making the change that I start out with audience "Only Me".
http://developers.facebook.com/docs/howtos/publish-to-feed-ios-sdk/
Then I arrange to call the following:
[FBSession.activeSession
reauthorizeWithPublishPermissions:
[NSArray arrayWithObject:#"publish_actions"]
defaultAudience:FBSessionDefaultAudienceFriends
completionHandler:^(FBSession *session, NSError *error) {
if (!error) {
// If permissions granted, publish the story
NSLog (#"Here goes nothing");
[self publishStory];
}
}];
which should publish the story to DefaultAudienceFriends. However, it continues to publish to Only Me.
Shouldn't this work? Am I missing something?
Ok, here is the answer I came up with, which addresses my particular need. I change the privacy settings for the app, in Facebook, here:
http://www.facebook.com/settings?tab=applications
And come to think of it, this makes sense. I, as a user of this app (which I happened to create, but that probably isn't relevant), am specifying the behavior it displays when it posts on my behalf.
So I'm happy, because now I can work on my app, freely test it, without disturbing anybody. And I can change it to post more widely, when I'm ready.
During the authorization flow you set the default audience, in your case "Only Me". Now that your app has permissions trying to reauthorize will likely do nothing, unless you probably logout and back in. What you can try doing instead is passing the audience you want as a part of the post parameter.
So, based on the sample, let's say you wanted "Only Me", you would add:
[self.postParams setObject:#"{'value':'SELF'}",
forKey:#"privacy"];
And if you wanted "Friends", you would use:
[self.postParams setObject:#"{'value':'ALL_FRIENDS'}",
forKey:#"privacy"];

How to get native Facebook login on iOS using SDK 3.1?

I downloaded the new Facebook iOS SDK 3.1, which promises to have a native login prompt. I ran their sample login app on my iOS 6 device. When I attempted to connect with Facebook, I did not get a native login. Instead, the Facebook app launched - same as the old SDK. Their Facebook login button basically does this:
[appDelegate.session
openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
[self updateView];
}
];
I thought maybe the sample code isn't calling the right function. So I tried FBSession's other login function.
[appDelegate.session
openWithBehavior:FBSessionLoginBehaviorWithNoFallbackToWebView
completionHandler:^(FBSession *session, FBSessionState status, NSError *error) {
[self updateView];
}
];
I tried all possible behaviours and none of them popped up the native login prompt.
Did you log into Facebook from the iOS settings first?
Once you do that, their example project Scrumptious will use the native login prompt when you try to connect.
Read this: https://developers.facebook.com/docs/howtos/ios-6/#nativeauthdialog
Basically you must request basic permissions and read permissions first and then request publish permissions separately.
This is by design, and described in the second section of https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/upgrading-from-3.0/
Basically, you are not able to ask for both read and publish permissions with the iOS6 dialog. Therefore you are more-or-less required to ask for them in a staggered way (e.g. read on first login, and then publish when your app actually needs to publish).
If you insist on using the deprecated method to try and get read & publish at the same time, the SDK has no choice but to return to the web or app-switched technique.

Resources