Facebook SwitchUserSample not working with API v2.0 - ios

I've been trying to copy the functionality of the SwitchUserSample Facebook project. This project shows how it's possible to manage multiple Facebook users in one app.
When I switch the Facebook sample project to use the Facebook Graph v2.0 the sample project stops working as it should. Rather than silently logging the new user in, it prompts them to enter their username and password each time.
Does anyone know of a workaround or solution to this problem?
Steps to repeat:
1) Download the sample project:
https://github.com/facebook/facebook-ios-sdk/tree/master/samples/SwitchUserSample
2) Create a new app in the Facebook developer area - new apps will use the v2.0 API
3) Compile the app and add a new user to a slot
4) Toggle the user - rather than silently logging in, it will show a login dialog

Related

Firebase verify phone number then authenticate user with email/password with Swift

I am building an app in Swift using Firebase. I want to authenticate user with email and password, but before create an account I need to verify the user's phone number.
I tried several ways but I'm still struggling with this issue .
I successfully Authenticated a user with Phone Number (I followed the great tutorial for the phone auth in Authenticate with Firebase on iOS using a Phone Number)
and successfully Authenticated a user with email and password (I also followed the tutorials in Authenticate with Firebase using Password-Based Accounts on iOS).
But I can't verify the user's phone number and then authenticate the user with his email , password and attach the verified phone number with other user information such as ( unique username , PhotoURL ...etc).
There are a couple of ways to achieve this. First and foremost, based on my experience its better you verify the users phone before going to authenticate them, like you are trying to do. I am assuming its an iOS app
I do not think firebase has that functionality built in natively. You may have to use some other third party solutions like Snich - https://www.sinch.com/products/verification/ or nexmo - https://www.nexmo.com/. Personally I have only used nexmo in my previous implementations So I could guide you through that path. You would need to create an account here - https://dashboard.nexmo.com/sign-up
When done, login and click on Verify at the top of the page, look to your left hand side of the page you will find Create an application. Click on it and create an application with your app name, specify the options you want based on your apps preference. When done an app secrete and app id will be generated for you. Please note it down.
Now am assuming you already have pod setup in your project, so I will not go into that. I mean for you to have firebase implemented then you have pod setup in your project. Add the nexmoverify sdk to your project by doing this: pod 'NexmoVerify'
The github repo for nexmoverify is: https://github.com/Nexmo/verify-ios-sdk
Go through their repo it will guide you.
You can then integrate Nexmo verify SDK into your project by following this guide - https://docs.nexmo.com/verify/verify-sdk-for-iOS/integration
That should get you going. If you encounter any challenge let me know and I will guide you

Facebook iOS SDK 4.x: changing the user to log in

I'm upgrading Facebook SDK from 3.x to 4.x and need to log in as different Facebook users to my application (game) in order to check if FB requests work correct.
In 3.x login dialog switched to FB application, so I could change the user in the FB application and got new credentials for my login. Now I only got "You have already authorised..." message in a Safari-view login dialog.
I changed user in FB application several times as well as uninstalled my application in order to clean its local cache - nothing helps. My application always logs in as User 1, even if I logged in as User 2 in FB application.
How can I login as a different user (clear saved token, got a credentials dialog or something else)?
You need to log in fb from Safari and exit the user =)

Quickblox sample chat unauthorized

I am trying to create a basic chat application in xcode using Quickblox.
I downloaded a chat project example that Quickblox supplies from here and entered my details in the AppDelegate class.
However when I run the application I get the error message: unauthorized.
What am I doing wrong?
Chat application uses predefined demo user login & password.
If you put your app details - you also have to update your user demo user login & password. Go to admin panel and create a new user for example.

How to login to application using user's Twitter account?

How can I create a login page where a user can login using their twitter identity.
I am running iOS7, So I have created a single page app.
I have added Social framework and added
#import <Social/Social.h>
I am wanting to keep the application as streamline as possible so when the application first loads, and loads each time there after I am checking if the user is signed into the app if not then I would like them to sign in using their twitter account.
I will check this here in the app delegate
- (void)applicationDidBecomeActive:(UIApplication *)application
However, I don't know how to sign in using Twitter.
Everything out there at the moment is focused around posting things to Twitter, I don't care about any of that. I want to know about using Twitter to sign into your app. and then what ever relevant issues I need to know. What data should I store to check when the user loads the app in the future etc.
You can follow following tutorial for twitter integration using user account.
http://www.techotopia.com/index.php/An_iOS_7_Twitter_Integration_Tutorial_using_SLRequest
if do you want to make custom twitter login than you can follow following url
http://codegerms.com/login-with-twitter-example-with-ios-tutorial-using-oauth/
Follow these two tutorial
First get access token, for getting access token follow the following tutorial.
http://codegerms.com/login-with-twitter-example-with-ios-tutorial-using-oauth/
Then using access token get account details, for getting account details follow following tutorial
http://codegerms.com/get-user-info-data-twitter-api-example-ios-objective-c/

Different Facebook Auth Dialog in Safari?

I found two different FaceBook auth dialog while using two apps one is "Poker by Zynga" and other one is I am developing.
When I use FaceBook login in "Poker by Zynga" then Safari opens this page:
And when I use my app which is under development now, then Safari opens this page:
You can see both of these are two different pages. In Poker by Zynga, it says "Logged in as Vicky Gupta - Log Out" where user can choose Log Out to sign in as a different user. While in my app it says "You are logging into this app as Vicky Gupta", in this there is no Log Out button. The only way to log in as a different user to open FaceBook in Safari and then log out from there.
Does any one know why this difference is occurring ? am i missing something in FaceBook app settings? Or is this a normal behavior because I don't think so?
Note: I am using the latest FaceBook SDK (with graph api).
If you are using latest iOS Facebook SDK, I think to logout a user you just have to delete the token obtained by the Facebook main object.

Resources