Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23424] Android: Support Facebook App Invites

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2016-05-26T22:23:23.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsAndroid
Labelsfacebook, module, parity
ReporterMartyn Joyce
AssigneeHans Knöchel
Created2016-05-20T12:51:26.000+0000
Updated2016-07-26T23:45:10.000+0000

Description

I submitted a ticket previously to have app invites supported on the facebook module. The ticket has been complete and closed (MOD-2200, although i can no longer see this ticket), however the functionality was only added to the iOS module not the Android module. We have a cross platform app and need this on both platforms before I can push out to our users. I have attempted to add this functionality myself but unfortunately I'm not up to speed enough on module development. Any help would be much appreciated!

Comments

  1. Nazmus Salahin 2016-05-22

    Hello [~martz256], Thanks for creating the ticket. Our engineering team will look into it. This need to be cleared by our selection committee. Please understand that the processes is time-consuming and lots of variables in play. We will let you know if and when we will be including this feature in our platform. Regards
  2. Martyn Joyce 2016-05-23

    Thanks @nsalahin, I think that the frustration here is that it was accepted the first time around but for some reason the Android version was not completed. Anything that you can do to help would be much appreciated. Martyn
  3. Hans Knöchel 2016-05-23

    Hey Martyn, blame me for the completion of the module. I did the iOS part as part of another PR to provide something working quickly for you. But as you also know, I don't work in the Android field, so we either need to wait until someone from the Android team has time resources for this feature, or await a community PR which we can review and merge. Since all dialogs are quite the same, it should be possible to do that.
  4. Hans Knöchel 2016-05-23

    Android PR (work in progress): https://github.com/appcelerator-modules/ti.facebook/pull/53 [~msamah] Can you try building the module and check it out? Or give me your build.properties to try it myself. Thanks!
  5. Hieu Pham 2016-05-24

    Hans, I'm assuming you're looking for something like this?
       titanium.sdk=/Library/Application\ Support/Titanium/
       titanium.os=osx
       titanium.version= 5.2.2.GA
       android.sdk=/Users/usrname/android-sdks
       
       titanium.platform=${titanium.sdk}/mobilesdk/${titanium.os}/${titanium.version}/android
       android.platform=${android.sdk}/platforms/android-8
       google.apis=${android.sdk}/add-ons/google_apis-8
       
    Just rename build.properties.example to build.properties and modify the paths. Also make sure your NDK path is set up properly in .bash_profile
  6. Hans Knöchel 2016-05-26

    Packaged module: https://www.dropbox.com/s/oeqx35pwz7cpndb/facebook-android-5.2.0.zip?dl=0 Demo code:
       
       var fb = require('facebook');
       fb.initialize();
       
       var win = Titanium.UI.createWindow({  
           backgroundColor:'#fff'
       });
       
       Ti.Platform.osname == "android" && win.fbProxy = fb.createActivityWorker({lifecycleContainer: win});
       
       var btn = Ti.UI.createButton({
           title: "Invite people"
       });
       
       fb.addEventListener("inviteCompleted", function(e) {
           alert(e);
       });
       
       btn.addEventListener("click", function() {    
           fb.presentInviteDialog({
              appLink: "https://fb.me/868269279951930",
              appPreviewImageLink: "http://abload.de/img/defaultvzusy.jpg"
           });
       });
       
       win.add(btn);
       win.open();
       
  7. Lokesh Choudhary 2016-07-26

    Verified the addition of Facebook app invites. Closing. Environment: Appc Studio : 4.7.0.201607111053 Ti SDK : 5.4.0.v20160725003348 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.5 Appc NPM : 4.2.8-1 Appc CLI : 5.4.0-34 Node: 4.4.4 Nexus 5 - Android 6.0.1

JSON Source