TwitterKit 3.0 and TWTRLoginMethod - ios

So TwitterKit updated to 3.0 and TWTRLoginMethod / Twitter accounts registered in iOS settings seems to be gone. Are there any news about this, anywhere? It looks like the only option is to use web/Twitter app login, which is a clear step down in UX.
Update 1: Ok, there is a changelog. It seems usage of accounts in iOS settings is not supported anymore. This is really really bad. We might have to consider to not use Twitter for login because of this.
Update 2: So with iOS 11 Twitter/Facebook/etc accounts are gone from iOS settings app. That obviously makes the real reason behind this change.
3.0.0: May 25, 2017 Added support for OAuth via the Twitter for iOS mobile app in -[Twitter loginWithCompletion:] and TWTRLogInButton
Update TWTRComposerViewController to handle full compose functionality
including image and video attachments Added result_type to
TWTRSearchTimelineDataSource. Removed boolean property topTweetsOnly
Removed TWTRLoginMethod in Twitter Added sending methods:
-[TWTRAPIClient sendTweetWithText:completion:] Changed TWTRComposer to present TWTRComposerViewController instead built-in iOS composer
Deprecated support for Card Removed TWTRComposerTheme Deprecated
TWTRComposer

Twitter Kit no longer supports using system accounts directly.
The new Twitter App login will allow users to seamlessly use any session from their mobile Twitter app, and the SFSafariViewController based login will allow users to use logged-in sessions from Mobile Safari. These log in flows also allow users to view permissions that the app is requesting.

Related

Facebook SDK version 4.28.0, App Invites is deprecated [duplicate]

As the latest release of Facebook SDK version 4.28.0 - November 7, 2017, App Invites is deprecated.
https://developers.facebook.com/docs/app-invites/android/
With the release of the Facebook SDK version 4.28.0, App Invites is
deprecated. It will be supported until February 5, 2018.
It makes the AppInviteDialog not working as expected (show white screen instead of list friends - Facebook app is not installed in the device), even I decreased Facebook SDK version to 4.27.0 or lower).
I tried to find out more information at offical docs but no luck.
Anyone have a solution for this trouble ?
You should also consider using popular messaging apps and other social networks to leverage app invites i.e Whatsapp, Kik, Twitter, Kakao etc. More details here
Our data shows that less than 18% of users prefer inviting via FB AppInvites, whereas the other 82% of users prefer to invite friends via WhatsApp,
FB Messenger and other chat applications.
(Disclaimer: I am founder of GetSocial)
Seems there is no other option for non-game applications but to remove Facebook app invites.
Google Firebase invites is good option we integrated recently and used side-by-side with Facebook Invites.
I was just trying to add invites for the first time and struggled for a long time until I realized that I need to do the following:
1 - Use Game Requests ( i.e. apprequests)
2 - Enable "Deep Linking" in Basic Settings page on Facebook developer portal for each platform, you won't see the option unless you also enable "Single Sign On".
Now the notifications open directly into app store if app not installed or into the game directly if it is installed.
The great thing is you don't need an App Link!!
Try GameRequestDialog to invite your friends. In that you can also set filter for NON APP USERS only.

How to use Google Apps with Google Sign-In (iOS 7)

When I try to login using Google Sign-In (2.4.0) on iOS 7, the application opens Web View, loads Google web-site and asks for a login and a password. It happens even if I have other applications from Google (like GMail) installed on my phone.
Is there a way to use Google applications for login if they are installed and use Web View otherwise?
I tried to set
GIDSignIn.sharedInstance().allowsSignInWithWebView = false
GIDSignIn.sharedInstance().allowsSignInWithBrowser = false
But all I got is "No sign-in handlers installed"
checkGoogleSignInAppInstalled also returns false
So the short answer from the team is, you're probably stuck using a WebView on iOS7. Due to some changes the team is making to improve the sign-in process on iOS9 (and up), you're going to start to see that iOS7 support is going to be a bit more basic than in the past.
It is a bit of a trade-off, but I think in the long run, it'll be worth it. Sorry I can't give you a better answer, tho.
From Google Sign-In iOS SDK Release Notes
2016-05-18 -- v4.0.0:
Removes allowsSignInWithBrowser and allowsSignInWithWebView
properties from GIDSignIn
This means that Google itself have removed these properties from their SignIn iOS SDK, we are not longer able to these properties.
Read more at Google Sign-In iOS SDK Release Notes

Apple rejected app 10.6 because Facebook opens Safari to login

I sent another version of my app, that allow users to login via Facebook. Of course, I use official Facebook iOS SDK.
But Apple twice rejected my app with following reason:
The app opens a web page in mobile Safari for logging in, then returns the user to the app. The user should be able log in without opening Safari first.
I tried to get more info, and reviewer's answer was:
Thank you for your response. We reviewed your app version 3.2.1 and when the user taps Facebook to login, the user is taken to mobile Safari and then back to the app.
It provides poor user's experience and not in compliance with the Guidelines.
and
Thank you for your response. It would be appropriate to allow the users to login inside the app without redirecting to mobile Safari.
Why only my app got this error, when dozens of apps using Facebook iOS SDK this way and don't get rejects?
Is there way in Facebook iOS SDK to open login page inside app?
Facebook SDK 4.0+
FBSDKLoginManager *login = [FBSDKLoginManager new];
if (![UIApplication.sharedApplication canOpenURL:[NSURL URLWithString:#"fb://"]])
{
login.loginBehavior = FBSDKLoginBehaviorWeb;
}
It will prevent to open through Safari.
The same issue happens with the Google+ SDK, the app could be rejected for the same reason:
Reasons
10.6: Apple and our customers place a high value on simple, refined, creative, well thought through interfaces. They take more work but are
worth it. Apple sets a high bar. If your user interface is complex or
less than very good, it may be rejected
----- 10.6 -----
We found the following issue with the user interface of your app:
The app opens a web page in mobile Safari for creating an account or
logging in for Google+ account, then returns the user to the app. The
user should be able to create an account or log in without opening
Safari first.
So the best solution is to move the server-side oAuth 2.0 through the Embedded WebView where the SDK does not let you to handle this automatically (like the Facebook SDK), at least until those SDKs does not make an update to handle the Embedded WebView use case.
Now Apple made their rules stricter.
You can find answer for your question in official Facebook documentation here.
Chapter "Embedded WebView Login Dialog"
The Facebook SDK for iOS provides various login experiences that your app can use to authenticate someone. This link includes all the information you need to know in order to implement Facebook login in your iOS app.Or Check ray wenderlich tutorial Facebook Tutorial for iOS: How To Use Facebook’s New Graph API from your iPhone App

What if Twitter or Facebook accounts are not configured on iOS 6?

Does anybody know a smart way to bring the user to enter their Facebook or Twitter account login information, if they aren't already logged in? For example, a user tries to log in my application with Facebook without configuring the Facebook account in the iOS settings. Can I ask him to do it with an alert, for example, but how can I bring him to the exact section of settings for that?
#rckoenes is correct. Under normal circumstances there is no way to manually send the user to preferences. There was a method of doing this introduced in iOS 5, but Apple quickly depreciated it in iOS 5.0.1 or 5.1 I don't remember exactly which one.
Now, on to the current situation. If you are using an SLComposeViewController in the Social Framework, you don't even have to worry about adding this functionality yourself. It is done automatically by iOS. Below is a screenshot from my 6.0 simulator attempting to post to Facebook without any accounts signed in. This is also true for Twitter and Sina Weibo.
You can't, there is no way to get the user to the settings app lett a lone the correct section.

Facebook access token in iOS

Which is the right approach to get access token for Facebook in iOS app?
Using Facebook app
Using safari
USing inline dialog
In case you are using the Facebook api for iOS you need only ask it to authorize. It will actually check if your device support multitasking. If so, it will first try to use Facebook app. If it will fall(as the app might be not installed on that device after all), it will proceed to safari. And if you are on non-multitasking device it will open an inline dialog popup.Just use the last version and that's it!
I think better will be to use UIWebView or ASIHTTPRequest
it's done automatically
it used to be that facebook authentication would always open a uiwebview to opt the user to enter his credentials.
But now - if your ios version supports multitasking - it will open the facebook app or safari if possible and ask for authorization and then redirect back to your application. for more information you should refer to the sample application of the facebook sdk.
So it will try 1 then 2 and then fallback to 3
https://github.com/facebook/facebook-ios-sdk

Resources