Facebook Login in two different apps of one iPhone - iphone

I developed two apps with facebook integration in both the Apps , my requirement is if i opend one app and login to facebook account , and if i open second app it should login at the same time .
Thanks
nikhil.

This isn't really possible, since both apps would then have to use the same Facebook App ID.
And since the Facebook App ID is should be part of the App URL scheme, iOS can't see the difference between the two apps and will open the one installed last.
You can try an store the Facebook login data in the keychain and use that in the other app, but not sure if that will work.

Related

can people see Facebook IOS app on their facebook?

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

iOS Facebook SDK,how to login within App , not in safari

Is it possible to use the Facebook iOS SDK to authenticate within an app (not go to Safari), and also keep those authentication credentials for the next launch of the app?
I have usedFacebook SDK sample code SessionLoginSample to check . It opens the Facebook login account in the safari....I want it to open with-in the app ..
I am not using FBConnect as it is been expired ...How to use it for the Facebook SDK
of
https://github.com/facebook/facebook-ios-sdk ...its sample code
https://github.com/facebook/facebook-ios-sdk/tree/master/samples/SessionLoginSample
this sample code here~~
The Facebook iOS SDK will open within the app provided your user is on iOS 6 and has their Facebook account setup within the device. Otherwise, it will gracefully fallback to the Facebook App (if installed) and then only to Safari. From the SDK Docs:
The native Login Dialog is available after a user has logged into
Facebook on their device. If the device isn't connected to Facebook,
the native Login Dialog isn't available and permission requests will
be made via the fast-app-switch to the Facebook app (if installed) or
Safari. The Facebook SDK methods [...] will seamlessly fallback to
this fast-app-switch behavior.
If your user has neither Facebook configured on their iOS 6 device nor the Facebook app installed and you still want the login to happen within your app, your best alternative might be to pull up a UIWebView pointed to your own server somewhere that carries out a server-side login.
Bear in mind a big disadvantage of a UIWebView-based approach is that your UIWebView does not share cookies with Safari so even if the user is already logged in within Safari they'll still need to re-enter their username and password again in your app. I'd be a little hesitant to do so in a third party app since there's no way to know if they're spoofing the Facebook site and phishing for my credentials.
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
login.loginBehavior = FBSDKLoginBehaviorWeb;

facebook app doesn't auth for my app

I have a problem to connect facebook app with my app.
I don't know much about facebook sdk, so I simply copy & paste from the facebook sample app.
(i only need upload image with some text).
it works well unless facebook app is installed on the device, but if a device has facebook app, it seems like can't get the login information.
I think it is because of facebook app doesn't ask auth for my app unlike safari browser.
What do I have to do?
Please Download the latest version of Facebook app (4.1.1) from app store. The Single Sign On(SSO) only supports in the latest version of Facebook application.

App Store can accept this flow or not

I have integrated Facebook functionality into my applications. By using the link https://github.com/facebook/facebook-ios-sdk, I have integrated the Facebook. In this application, at the time of login, it's opening Safari and at the same time the application is going to the background and then after login again it's coming back to the application. My intention is that this flow can accept the application store or not.
This is the official Facebook iOS SDK and many apps in App Store already use it. So you can use it inside your app.
Also, the flow in your question is exactly what the documentation of the library describes and is, again, used by apps that are already in App Store:
If the device is running in a version of iOS that supports multitasking, but it doesn't have the Facebook app of version 3.2.3 or greater installed, the SDK will open the authorization dialog in Safari. After the user grants or revokes the authorization, Safari redirects back to the calling app. Similar to the Facebook app based authorization, this allows multiple apps to share the same Facebook user access_token through the Safari cookie.
So, yes, there is nothing wrong with this flow.

How do you get your app to appear on the Facebook Mobile Application? (specifically iPhone)

We have a popular Facebook Application and a version of our App for the iPhone. I was wondering how we can make our Application appear in the "Apps" Section on the new Facebook iPhone app. On my iPhone I currently see links to the App store for Pixable, Badoo, Airbnb, Foursquare and WhoisNear iPhone Application.
I have filled out the Native iOS App settings in the Developer section on Facebook (including adding the Bundle ID and the iPhone app store ID) several weeks ago thinking it took a while to update, but still nothing shows up on my iPhone app.
Any help would be appreciated.
Best,
M
Screenshot of where we want our app to show up:
Edit your Application Settings and on the Basic Settings specify a Mobile Web URL for your Mobile Web integration. You should be able to set the URL to your app's iTunes URL.
Fill out the iOS information within the admin settings of your application, which also means they are using the same application id. You also have to have granted at least the basic permissions via connect on the app, and have the app installed on the phone.