I have a free and paid version of my app on itunes but as the free version has in app purchase I cant use the same bundle id across the two apps and therefore the only way I can see of adding facebook to the free app is having a second facebook app registered?
I have done this but for some reason when calling [facebook authorize: permissions] my app boots up the facebook app but returns straight away to my app, not getting in to any of the handleOpenUrl functions or even asking the user for permissions. The code is identical line by line to the paid version of my app with the only difference being the appID that is used. Any ideas what would cause this? Facebook did work on both apps until the recent updates.
After further playing around with this code I have found it works if I tell it to not use the FB App and to instead use safari authorisation. Still failing to see why I can use the app on one app but not another :s
Log in to developers.facebook.com and check your iOS bundle ID for your free app carefully. Make sure the bundle ID you tell Facebook is exactly what your app thinks it is. If it's not identical, the new Facebook app will not allow your app to authenticate.
You can have multiple iOS apps use the same Facebook app. Check this link..
https://developers.facebook.com/docs/mobile/ios/build/#multipleapps
There are three steps:
Add the additional bundle id in your apps "iOS Bundle ID" file in your faceBook app settings.
Then in your iOS apps, use the 'urlSchemeSuffix' option in the 'initWithAppId' method.
Modify the URL Schemes property in the info.plist.
The link explains it in detail. No need to register a 2nd app with Facebook.
Hope this helps.
Related
I've created an IOS app as a Facebook Developer. So my question:
Are people able to see the app when they go into their Facebook - like in the Browser? Or are Facebook IOS apps only something that you can see in the actual app on the iphone/iPad that I'm creating?
Depending on whether the Facebook developer configured a canvas facing site will show what the end user will see.
Any application made by a third party once set to public in app settings can be viewed by anyone.
If you app is made for iOS then either the user will see a misconfigured webpage or dialog asking whether the user wants to send to mobile. All of this of course depends on how the the developer of the application sets everything.
See the documentation for detailed information
https://developers.facebook.com/docs/facebook-login/v2.2
I have an iOS app configured to use Facebook login via iOS's ACACcountStore. I'm not using the Facebook SDK.
I'm creating another app (for the same company) and I'm trying to take advantage of the existing Facebook App that I've set up for the first iOS app.
I've read that you can add multiple bundle ids in the Facebook App's Settings. I've done this, but unfortunately, I get an ACErrorPermissionDenied error when trying to log in.
Using iOS's built in Facebook login, am I able to share one Facebook App Id with multiple iOS apps with different bundle ids?
Ahh, figured it out.
The good news is that this is definitely possible. Just go into your Facebook app's settings and add another bundle id.
Make sure that the bundle id you've set in your app is exactly the same as the one you add to facebook.
In my case, I was formatting part of my bundle id like so:
com.myApp.${MY_CUSTOM_BUNDLE_ID_SUFFIX:rfc1034identifier}.
MY_CUSTOM_BUNDLE_ID_SUFFIX is a User-Defined setting in my Target's Build Settings. I had it set to:
foo.bar
When processed with the rfc1034identifier, the . was converted to a - so it ended up being com.myApp.foo-bar, so the mismatch is what was causing login to fail.
I've been trying to learn how to do my first facebook app. The directions at developers.facebook.com/apps/407656052586647/summary?web_hosting=0 asks for my ios bundle id.
I've looked on this website, and Bundle ID Suffix? What is it?, discusses it (assuming bundle id and bundle suffix id are the same), and it sounds like it's linked to the apple id. I'm just developing the app and don't have an apple id yet, assuming it's tied to distributing the app to itunes. Which comes first, the chicken or the egg? I haven't even written the app so how could I have an id for itunes? I saw this Bundle ID for App submission iOS, but I'm absolutely not ready to submit it to itunes.
I read somewhere on this site that I need to go to xcode ->resource->settings bundle to create a bundle for the project. Would I put every file for the project in the bundle in the finder window?
Also, the hackbook example, referred to in http://thinkdiff.net/facebook/how-to-develop-facebook-application-for-iphone/comment-page-1/#comment-293743, in step 3 (it's calling it demoApp, but the name I found is Hackbook, but it's working as an example so far anyway) refers to setting the kAppId. Their link to create an app id doesn't work. Would it be the same as what I'm doing at developers.facebook.com in the first paragraph of this question above? Would this app id be what I get from a successful submision at developers.facebook.com/apps/407656052586647/summary?save=1 ? I see they are listing an app id and app secret code there, but it's not working because I don't have an ios bundle id? Would the bundle id be my bundle name (drag contents of xcode project in)?
Thanks for any help you can provide...
Mich
There's no need to worry about submitting the app to iTunes yet.
In order to get your app working with Facebook, you'll need to access https://developers.facebook.com/apps.
From there, click "Create New App"
Simply specify App Name. App Namespace is not needed at this point and is optional.
Click Continue and you're new Facebook app will have been created. From there, you will be provided your App Id. Use your Facebook App Id in this line of code:
[[Facebook alloc] initWithAppId:#"<APP ID GOES HERE>" andDelegate:self];
Your links dont work, but I think that they refer to the bundle ID on developer.facebook.com where you will need to create an App ID and use it in your iOS app. Did you do that already? Thats definitely a prerequisite before you even deal with itunes.
This seems to be a popular question so I thought I'd add some more info on what I decided to do. After I created the app id at the facebook developers link, I wound up using ShareKit2.0 to get the newer version of ios to work. The Hackbook/Demo example at the link above is in the older ios version so I couldn't get it to work with ios5. It was helpful to use the Hackbook to figure out what I needed for permissions, but that's it. I wound up following the SharKit2.0 directions (not at their website, go to the git version that the community is currently updating). Static Facebook sdk has no .m files in it
The directions that are at the link were helpful to create and start my first facebook app including app id. I never wound up doing anything with Bundle.
I would like to integrate Facebook into an iOS application I am building, however it seems there is no way to set up a Facebook 'Native iOS Application' with an iOS application that is not already published and available in the App Store.
When I Set up a Native iOS Application for my Facebook App from my Facebook developer's account it requires that I fill in my App Store ID. However when I submit I get the following error message:
Your iPhone App Store ID is invalid because the iTunes App Store
reports your app as being unavailable for iPhone and iPod touch.
I have set up my application on iTunes Connect, but I have not submitted my binary yet as I am in the process of building it, so I assume that this message is due to it being unavailable on the App Store.
This seems like a catch 22 situation. I can't test my app until its in the App Store but I can't get my app in the AppStore until I have tested (and built) it. How can I test my iOS application with Facebook before release?
I've been there, but the solutions is simple.
Don't fill out the Facebook 'Native iOS Application'!
For testing all you needed is the Facebook appid.
Later on in the Deep Linking portion of the iOS Facebook Tutorial, it also mentions the AppStore ID and that you can use somebody else's ID temporarily to get all the data to save. They just say to make sure you use your own id when you finally do publish the app.
I dont think facebook Native iOS App settings are necessary. I have done facebook login with it in two of my apps and without it in one of my app and all are running well. Here are workaround by me:
Native iOS Facebook SSO won't return to app
I want to test my application's facebook integration.
My application is not released in the appstore yet.
What should I do with bundle ID and appstore ID?
What data to should I write there?
will it work if I provide bundleID and appstore ID of my unreleased but registered app in appstore?
There is no need to give the Appstore Id and Bundle Id... just leave it as blank... Now only I Tested it works fine
I'm not exactly sure what is the question - If the question is "Will i be able to implement Facebook for iOS without the app is registered on the App Store" , the answer is Yes.
I usually use and recommend the Facebook iOS SDK which can be found on Github : https://github.com/facebook/facebook-ios-sdk
Facebook also has a really nice guide about the basics of creating the implementation on iOS which can be read here:
http://developers.facebook.com/docs/mobile/ios/build/