[TIMOB-15266] Android (parity): Implement "NewPermissionsRequest" as "reauthorize"
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Reopened |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, facebook, parity, permissions, reauthorize |
Reporter | Fokke Zandbergen |
Assignee | Unknown |
Created | 2013-09-12T14:34:09.000+0000 |
Updated | 2018-02-28T20:03:34.000+0000 |
Description
For some reason, the
authorize
method is only available on iOS. AFAK there's no clean way on Android to get additional permissions. The only [workaround](https://github.com/FokkeZB/UTiL/blob/master/faceboost/faceboost.js#L127) is to logout and authorize again, but that's really ugly, triggering login/logout events with unwanted effects.
IMHO the Android SDK's [NewPermissionsRequest](https://developers.facebook.com/docs/reference/android/current/Session.NewPermissionsRequest) could be implemented to fix this parity issue.
No way this is
Not Our Bug
. Both the iOS and Android Facebook SDK's provide methods to ask for additional permissions. In Titanium this is only implemented for iOS. Because of this there is now no way to ask for additional permissions on Android after they have withdrawn earlier given permissions or were logged in with the minimal permissions, like advised by the Facebook Dev Docs. This *should* get implemented and given high priority. Social login is a core-feature of many apps.[~fokke] I've reopened the bug and inquired why it was resolved as such.
Appreciate that [~ingo], thx!
Please see this: https://developers.facebook.com/docs/facebook-login/checklist/ It's quite possible that the Ti Android Facebook module will be broken October 2nd.
And like number 6 on that checklist states "Ask only for the permissions that you need" So that's why we need reauthorize for Android as well. Please guys, social integration should be top priority for an app platform, we need this in 3.1.4
We need this before October 2nd, apparently......
From the link: "Native iOS and Android apps must not use custom web views for Login (Effective October 2, 2013)"
In addition, neither the iOS nor the Android modules support the new Share dialog. This dialog provides a native app view, and is not web based like the old dialogs. It's the recommended method now for sharing on Facebook enabled apps. https://developers.facebook.com/docs/ios/share-dialogs-ios-sdk/ https://developers.facebook.com/docs/android/share-dialog/ BTW - one of the key advantages is that the share dialog doesn't require any additional permissions, in fact it doesn't even require the user to login to the app with Facebook.
[~mokesmokes] We've reviewed the link, and we are using the APIs provided by Facebook, not our own custom web view, so we appear to be unaffected by the October 2nd deadline. To the larger point, we are planning on scheduling an upgrade to the Android module and a switch to the non-legacy APIs. However, based on the amount of time that will take, I am not certain we can fit that into the 3.2.0 timeframe. We will keep you updated with any scheduling information.
I wrote a new Facebook Android module based on the latest SDK (3.5.2). I wrote just what I need currently for my app (login/logout and Share Dialog) - but the architecture is such that it is very easy to extend. There is a separate Activity that handles all the Facebook state changes, that Activity is written entirely in accordance with Facebook docs - and the module communicates with that activity. This module is in production for me, and is faster and more reliable than the existing module. Pull request is here: https://github.com/appcelerator/titanium_modules/pull/143 or just go to my repository: https://github.com/mokesmokes/titanium_modules/tree/master/facebook/mobile/android
The Facebook module really need to be updated, hopefully fixing parity and other bugs with that. What are your thoughts on the PR [~ingo]?