Facebook logout after posting iOS- Kiosk App - ios

I have a kiosk app. I need users to login to post on facebook and immediately after posting force the facebook account to expire or logout.
In my understanding, I though couldn´t use the Social Framework of ios 6 because doesn´t work for the login/logout of many different users because it´s attached to an account in the settings of the device. So, I used an old code Facebook of Andy Yanok prior to ios5. Everything works perfect, except that so far I am not able to logout the session, after posting. At the moment I am looking for alternatives, maybe with the ios facebook SDk or inside the facebook app. I have cero experience with facebook apps so I have no idea if that is possible.
So, I would like to know if someone has experience with implementing facebook on an ipad kiosk. And how can I perform log-in window, posting and logout in the easiest way. If this can be done with the fb sdk or which is the fastest alternative.
If the facebook app is the option, please explain with detail , like I said I have very little experience making facebook apps.
Thanks!!

Ok the solution I used for this was to use the same Facebook code I already had and add some additional code to the log-out in the Facebook.m to delete the cookies. I found the code to implement here

Related

salesforce login in ios native App

I am quite new to iOS and i am trying to post something from my App on salesforce(like we share something on twitter). For that i want to first display the login screen if user is already not logged in and if user is logged in he can post on salesforce from my app. Please guide me to a tutorial or some sample code. i have done a hell lot of searching on web but didn't find any good tutorial. i have already added the SDK to my project but not able to figure out how implement all this.
Thank you.
what about this : SalesForce on iOS login without using the SalesForce Webview?
The post point to SFDC API for iPhone. May be you will found what you need.

Share using Facebook Application

Right now I'm using a Facebook SDK to share posts from my application. The problem is that this sdk pops up a webview inside my app and asks the user to log in. There has to be a better way.
Can I send the share information to the facebook app on the users device (If they have it installed)? Or at least leverage the facebook app to check credentials? If people have to sign in to share, they probably won't do it..
The latest Facebook SDK 3.5 includes a native share dialog. If you follow the authentication workflow according do the documentation and the phone is on iOS 6.0 you should not get a UIWebView during authentication, instead you will get a UIAlertView.
Facebook login process would use WebView only in a few cases. Some of them are:
1) You are asking it to do so explicitly, by using - (void)openWithBehavior:(FBSessionLoginBehavior)behavior completionHandler:(FBSessionStateHandler)handler; which, I think, is not your case.
2) If there is no Facebook app installed on the device, FB SDK falls back to using WebView login window.
3) Probably, this is your case. If you are requesting publish permissions on the first attempt to open FB session, FB SDK will also fall back to old login flow envolving WebView. In the new login flow, FB session is supposed to be open with read permissions first (in that case, FB will use fast app switching or native iOS FB login):
+ (BOOL)openActiveSessionWithReadPermissions:(NSArray*)readPermissions allowLoginUI:(BOOL)allowLoginUI completionHandler:(FBSessionStateHandler)handler;
Then, you should ask additional publish permissions from the user:
- (void)requestNewPublishPermissions:(NSArray*)writePermissions defaultAudience:(FBSessionDefaultAudience)defaultAudience completionHandler:(FBSessionRequestPermissionResultHandler)handler;
That way, user will not need to log in (if he is logged in FB app already), but there will be inconvenience of double switching from your app to FB (though it works rather fast lately).
I was looking for a cleaner way to get publish permissions with FB Single Sign On on the first call, but unfortunately didn't find anything working yet.

iOS Facebook SDK: which login system is better?

I am developing a iOS application which allows users to login by using their Facebook account.
I managed to implement the login procedure thanks to official tutorial I found here https://github.com/facebook/facebook-ios-sdk. I found here https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/authenticate/ another tutorial which looks pretty different since in the first tutorial the user signs in through Safari, instead in the second tutorial the native Facebook App is used.
Among these two systems, which one is better? Perhaps by using Safari I could avoid any issue concerning back compatibility with older versions of iOS?
Thanks!
If you're using the official Facebook SDK, here's what happens:
If a user does have the Facebook app installed, they'll be taken to it to authenticate and login to your app.
If the user does not have the Facebook app installed, they'll be taken to Safari to authenticate and login to your app.
Either way, the login process is the same. After they authenticate, they're returned to your app using a specific URL scheme so that you can continue with what you're doing.
Finally, if you're targeting iOS 6 only, you can take advantage of the single sign on features built into iOS. Check the docs for more information on that.

facebook dialog ios for login

I have followed the example of Facebook SDK for iOS (Hackbook) and it works well however whenever the person is logging in the app takes take the person to Safari or the Facebook app (if you have it installed on the device). Is there a way I can call the permission without leaving the app.
Thanks
there once was. But facebooks says that you should use SSO (single sign on) with the official facebook app. So even if you'd modify the files of the facebook-ios-sdk, it would probably not work.

iOS Facebook API - Post stories using custom/native UI

I'm starting development of a social app (oxymoron? :p) and wish to implement the Facebook api, however, I want to make use of native iPhone UI (i.e. text fields and buttons) to post stories.
I know it's against their policy to make custom login screens, and I won't do that. Just wish to make my own UI for posting stories and etc.
It kind of breaks my app idea if I can't do this, so really hoping there's a solution.
The dev pages on FB didn't prove much help.
Yes this can be done. Check the samples on the Facebook iOS SDK. You can prompt the user for the status to be sent, and then post this to /me/feed as per their API documentation. You will just need to have the user authenticate with your application first and prompt for publish_stream extended permission.

Resources