Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15266] Android (parity): Implement "NewPermissionsRequest" as "reauthorize"

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusReopened
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, facebook, parity, permissions, reauthorize
ReporterFokke Zandbergen
AssigneeUnknown
Created2013-09-12T14:34:09.000+0000
Updated2018-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.

Comments

  1. Fokke Zandbergen 2013-09-18

    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.
  2. Ingo Muschenetz 2013-09-18

    [~fokke] I've reopened the bug and inquired why it was resolved as such.
  3. Fokke Zandbergen 2013-09-18

    Appreciate that [~ingo], thx!
  4. Mark Mokryn 2013-09-24

  5. Mark Mokryn 2013-09-24

    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.
  6. Fokke Zandbergen 2013-09-24

    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
  7. Mark Mokryn 2013-09-24

    We need this before October 2nd, apparently......
  8. Ingo Muschenetz 2013-09-24

    From the link: "Native iOS and Android apps must not use custom web views for Login (Effective October 2, 2013)"
  9. Mark Mokryn 2013-09-25

    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.
  10. Ingo Muschenetz 2013-09-25

    [~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.
  11. Mark Mokryn 2013-10-07

  12. Mark Mokryn 2013-10-14

    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
  13. Fokke Zandbergen 2014-05-28

    The Facebook module really need to be updated, hopefully fixing parity and other bugs with that. What are your thoughts on the PR [~ingo]?

JSON Source