Social Sharing Phonegap Plugin - index.html not available (glitch) - ios

Right now i'm using phonegap for my mobile app project. My problem is this glitch happen only on certain of device. I'm using social sharing phonegap plugin from here.
https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin
I'm using iphone 5
Why?

in documentation of plugin you can see
If Facebook, Twitter or WhatsApp is not available, the errorCallback
is called with the text 'not available'.
so there can be some error with privacy settings, or social account of selected network not configured on your device.

I've just changed the plugin behaviour in this exact case. Still, the errorcallback is invoked with 'not available' as Sergey mentioned correctly, but on iOS the plugin will now prompt the user to setup his Facebook/Twitter/.. account in the Settings of the phone (as per Apple design guidelines).
If you don't want the user to see the Facebook or Twitter button when he has not configured the app already, you can use the 'canShareVia' methods check beforehand.
Hope this helps,
Eddy

Related

TwitterKit 3.0 and TWTRLoginMethod

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.

IOS Deeplinking- Pass msg from email to your app

Existing user of the app will send email to other user.
Other user may have app installed or not installed on their device.
The email will contain some token. Now I want to pass that token to my app. I have read that by deep-linking, its possible. But how will I handle the case when other user have not installed my app yet in their IOS device.
Any help is appreciated.
What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app, even directly to a specific piece of content, and Deferred means that it works even if the app isn't installed first).
Unfortunately there's no native way to accomplish this yet on either iOS or Android. URL schemes don't work, because they always fail if the app isn't installed. Apple's new Universal Links in iOS 9 get closer, but you'd still have to handle redirecting the user from your website to the App Store
A free service like Branch.io (full disclosure: they're so awesome I work with them) can handle all of this for you though. Here's the docs page covering exactly how to create email links like you described: https://docs.branch.io/pages/emails/email-partners-list/

Sharing on Facebook from iOS

The Facebook share button displays as disabled in my application.
I have implemented as per the given URL
https://developers.facebook.com/docs/sharing/ios#videos
I tried in many ways but there is no use. In the above specified URL, they did mention that
"People who share should have Facebook for iOS client installed, version 26.0 or higher."
May i please know what I should do to satisfy the above given requirement.
I am successful with sharing the Photos and links but I am stuck with the videos sharing.
Thanks in advance for the help.
As per the mentioned line provided in facebook docs:-
People who share should have Facebook for iOS client installed, version 26.0 or higher.
The line simply means that the user who is using your app to share video must have Facebook app installed in their device , the facebook version should be updated at least 26.0 or higher.
Check whether the "FacebookDisplayName" matches with the name you entered in your Facebook Developer's App settings.
Note :- The videos must be less than 12MB

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.

Resources