anypic facebook login error - ios

so, i followed the guidelines that is introduced on anypic github page.
1. I put my pplication ID and client key in appdelegate.m
2. I made my app named 'app1'on both facebook and parse.
3. I put my facebook app ID in info.plist
4. i also wrote the URL scheme in info.plist
5. I put my facebook app id and secret key in my parse account .
6.i also followed all the other changes including cloud code, js and etc.
7. I also submitted my anypic's bundle identifier to facebook dashboard.
(which was com.parse.anypic)
However when i run the app on my simulator, whenever i press the facebook button , the safari takes me to a web page saying 'the settings made by the developer is not proper to login(?)' well i'm not sure what this sentence actually means in english because i use different language on my virtual machine. Anyways if anyone knows anything about this problem please give me an answer..

Please check that you have made the Facebook app available to Public in your App Settings page.
Also You need to insert your platform details, for which platform you are developing your app and your development machine's keyhash. Make sure the key which you are using to debug your app is same whose keyhash value you enter on Facebook developer console.

Related

Consequences of mismatching Display name between Facebook iOS SDK and Facebook App Dashboard

In the Facebook documentation it states we should set the Display Name of our Facebook App, either by an entry into the plist with a key of FacebookDisplayName or by manually setting it on the Facebook SDK (setDisplayName: on FBSDKSettings)
https://developers.facebook.com/docs/facebook-login/ios#4--configure-your-info-plist
I am changing the name of my app. I have currently got previous versions of the app that use the Facebook Display Name App Name 1. I would like to change the name of the Facebook app to App Name 2. This means currently live apps will be using the wrong FacebookDisplayName.
I cannot find any documentation on what the effect of setting display name programmatically in the app actually is; it appears to do nothing.
What happens when the Facebook App name changes in the Facebook App Dashboard but old apps are using the old name?

Facebook App Links don't open my app

I have added my URL scheme to my .plist.
I have manually tested the scheme in Safari and confirmed that it launches my app just fine.
I have generated a hosted app links link that uses the scheme.
Nothing except my own URL was entered when creating the hosted app link.
When I tap the link on my phone (with my app installed) it takes me to a page with the text You have reached an implementation detail. It's pretty obvious that Facebook didn't even try to use the URL that I had provided when creating this hosted app link.
I should add that I have successfully created other hosted app links moments before that managed to redirect to webpages and to appstore, so there's nothing wrong with mobile Safari.
Where to go from here?
Edit: My app is, of course, in development.
I was having the same issue until i updated my app settings in the facebook developer site.
In the image for #1 you enter the prefix (even though it says suffix...) for your url scheme (ex: if you use myapp://testing/here, then enter "myapp" into the field)
make sure #2 is flipped to yes
Facebook iOS Settings
This is an old thread, but after spending some time on this I realized that the https://fb.me/... links only open from within the Facebook app on the device. They will not (and are not intended) to open from a web browser. After posting the link in a Facebook group I was able to successfully open my app with it.

iOS different bundle ids map to the same app

I'm trying to follow the convention described in this answer to manage both an app store and enterprise version of the same app but am seeing some really interesting behavior.
As described in the linked answer I've created a new scheme, defined a new 'Enterprise' build configuration and set up the enterprise scheme to use a separate and new bundle id. Both schemes point to the same target which relies on the new build config to toggle behavior. I am successfully able to generate an enterprise build and distribute it over-the-air, however, when I install both versions of the same app on the same simulator or phone the enterprise version actually runs the app store version of the app. Any changes that I make that are enterprise specific do not get reflected. Even when I close the app - the iOS7 animation back to the home screen animates back to the app store icon - not the enterprise one.
Obviously I want to be able to maintain these as separate versions that run independently. I feel like I must be fundamentally misunderstanding targets and schemes to get this kind of behavior. Any help would be greatly appreciated.
Pretty interesting bug.
What was happening was:
We were using facebook login to authenticate with our own services on the enterprise version.
The FB SDK would take over and kick out to a web/view or the fb app, depending on it's own logic. Critically - we were using the same facebook "app" configured on their developer site.
When fb returned it would call the url scheme denoted by fb{app_id}
iOS decided (consistently) to open the app that was first-installed that would respond to that URL scheme. In most cases this was the app-store version NOT the enterprise version.
The solution for this - maybe obviously at this point - is to use two different facebook apps so that iOS can route the returning OAuth response to the proper app. In keeping with the answer that I was originally working off this is best done by...
Creating a new user defined build setting entitled FACEBOOK_ID
Use your production app id for Debug and Release, while using the new id for Enterprise.
In your info.plist, change the value of your FacebookAppID to be ${FACEBOOK_ID}
In your URL Types, change the facebook scheme to be fb${FACEBOOK_ID}
This should successfully route your facebook login.
Keep in mind this is a general potential bug for ALL deep links - not just facebook login.
It is easier to use URL Scheme Suffix instead of separate Facebook apps. With URL Scheme Suffix you can add suffixes to the bundle id, for example: com.example.App.live and com.example.App.beta. That way the Facebook url scheme knows which app to open after authentication.
See the documentation on Facebook's developer site for more into: https://developers.facebook.com/docs/ios/troubleshooting#sharedappid

Facebook SDK - iOS - Fail to share URL (Error 102)

I am trying to integrate a simple URL Share on my App, following the dedicated Facebook tutorial (link)
On my app, I simply click on a button, which displays a dialog where I can type in a comment.
This part works find. Yet, when I click on "Post", I get the following error :
Error Domain=com.facebook.Facebook.platform Code=102 "The operation couldn’t be completed. (com.facebook.Facebook.platform error 102.)" UserInfo=0x14dd1a10 {error_message=Failed to authenticate the application because of app name mismatch. Please check the application name configured by the dialog., app_id=000000, error_code=102}
(In this message, I just replaced with zeroes the app_id I got from the Facebook developer page.)
On the Facebook app settings, I set the following as such :
"Display name" : the same name as the app name
"Bundle ID" with the string return by [[NSBundle mainBundle] bundleIdentifier];
The app is "live" (not in sandbox)
"Deep Linking" and "Connect to FB" : both activated
When I save my settings on the FB dev page, I get a warning saying that I did not set an AppStore identifier (which is not yet available since I am developing the app).
Can you please tell me the little thing that I did not do correctly ?
Thanks in advance for your reply.
I'll be happy to provide you with more info if necessary.
This usually comes from you setting the FacebookDisplayName in your .plist, but what you set there didn't match the name of your app in your app settings on Facebook.
The value you give in FacebookDisplayName must match what you have set on Facebook.
Check Following if error 102 comes
FacebookDisplayName is set properly and correct in plist URL Scheme
fbxxxxxxxxxxx is added in the plist
FacebookAppID is set correctly in plist file
in Status & Review section Make sure you have "Do you want to make this app and all its live features available to the general public?" make as YES (By default it is set as No)
For me none of this solutions worked. It turned out I just had to delete facebookDisplayName record from info.plist. Stranged but it worked
There is also a problem with diacritic signs, you can not use it in FacebookDisplayName... for example č, ž, š etc. If you write all without diacritics, it works fine.
I agree with #user3170877. it can't be used like Japan letter and Korean. i recommend only english to use.
Login to Facebook Developer account and check Status is live or in Development. If it is in Development then change it to live. This worked for me.
If none of the other answers fixed this problem for you, one last thing to check is the Bundle ID in your Facebook App settings.
I had this problem for my iOS app that was using a different bundle identifier depending on the build configuration I used.
You can specify several Bundle IDs in your Facebook App settings.
If your Facebook app status is "development and unavailable to the public" will caused same result.
You may want to change it to public under "App Review" on the Facebook app menu. Or you need to login Facebook as role "Administrators", "Developers" or "Testers"

Two iOS apps using the same Facebook app ID - is it possible?

I'm using the latest facebook iOS SDK (supporting SSO) to connect my iPhone app with facebook. So far so good..
Since my current app is free with ads, I would like to create another version without ads (which i will charge for). I prefer not to use the in-app purchase approach.
The problem i'm facing is that with the facebook SSO, I need to bind the iOS application to a URL which is based on the facebook app ID. Since I have only one facebook app to be used by both of the iphone apps, the two iOS apps are binded to the same URL and therefore when both of them are installed on a device the callback from facebook to my app does not work (or opens the other app instead).
Is there a solution for that besides creating another facebook app dedicated to the new version of the iphone app?
Thanks.
I had to use FBLoginView in my app, and none of this solutions worked. The only missing thing was that i needed to add a new entry in the plist file: FacebookUrlSchemeSuffix (documented here, in the Step 2).
Suppose that your App ID is 123456, what i had to do was:
1) In your facebook app, add a URL Scheme Suffix in the iOS section:
2) In both of your applications, go to the app's .plist, and add the following entry:
Note that the Value must be one of the URL Scheme Suffixes added.
3) Also change your URL Scheme for Facebook in the .plist file to fb. For example, fb123456client
In the latest Facebook iOS SDK on Github there's a method called authorize:delegate:localAppId: initWithAppId:urlSchemeSuffix:andDelegate:. You can use the localAppId urlSchemeSuffix parameter to distinguish multiple iOS Apps that use the same Facebook application id. The method documentation says:
urlSchemeSuffix is a string of lowercase letters that is appended to the base URL scheme used for SSO. For example, if your facebook ID is "350685531728" and you set urlSchemeSuffix to "abcd", the Facebook app will expect your application to bind to the following URL scheme: "fb350685531728abcd". This is useful if your have multiple iOS applications that share a single Facebook application id (for example, if you have a free and a paid version on the same app) and you want to use SSO with both apps. Giving both apps different urlSchemeSuffix values will allow the Facebook app to disambiguate their URL schemes and always redirect the user back to the correct app, even if both the free and the app is installed on the device.
urlSchemeSuffix is supported on version 3.4.1 and above of the Facebook app. If the user has an older version of the Facebook app installed and your app uses urlSchemeSuffix parameter, the SDK will proceed as if the Facebook app isn't installed on the device and redirect the user to Safari.

Resources