Titanium JIRA Archive
Appcelerator Modules (MOD)

[MOD-2321] iOS / Android: Facebook Push Campaigns

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2017-01-24T18:12:06.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsFacebook
Labelsfacebook, ios, pushcampains
ReporterGanna Kozynenko
AssigneeHans Knöchel
Created2017-01-19T19:31:05.000+0000
Updated2018-08-06T17:49:16.000+0000

Description

I am not sure where to post this, as issues are disabled in Github's Ti.Facebook module. But I have received from the client the request to implement facebook push campaigns (part of Facebook SDK now, not sure from when) , and it is not implemented in Ti.Facebook module. Is there any roadmap for it? https://developers.facebook.com/docs/analytics/push-campaigns

Comments

  1. Sharif AbuDarda 2017-01-19

    Hello, Thanks for the feature request. Can you create a PR on this? We will consider it.
  2. Ganna Kozynenko 2017-01-19

    I don't know, I am not sure I have the required knowledge to implement it, because I am not a native developer
  3. Ganna Kozynenko 2017-01-19

    If I have no other choice, and the client insists, I will definitely try, but I am not sure about the outcome. As a matter of fact, according to what I see, 2 methods should be added for things to work at a basic level (simple wrappers) : 1. sending token [FBSDKAppEvents setPushNotificationsDeviceToken:deviceToken]; or AppEventsLogger.setPushNotificationsRegistrationId(token); 2. Loggin the received notification: [FBSDKAppEvents logPushNotificationOpen:userInfo action:identifier]; and logger.logPushNotificationOpen(payload); --- Rest of the push notifications stuff already present in Appcelerator or related modules (as in case of Android), so the user can use the normal Appcelerator push functionality to retrieve token and to log the received notifications.
  4. Ganna Kozynenko 2017-01-24

    https://github.com/appcelerator-modules/ti.facebook/pull/81 --> IOS Android is on the way (doing testing with the app)
  5. Hans Knöchel 2017-01-24

    PR reviewed, adjusted and merged. [Ti.Facebook Android 6.2.0](https://github.com/appcelerator-modules/ti.facebook/releases/tag/android-6.2.0) and [Ti.Facebook iOS 5.4.0](https://github.com/appcelerator-modules/ti.facebook/releases/tag/ios-5.4.0) include the changes. [~annakozy@direcciona.me] please provide a single-app.js demo-code and testing-steps so our QE can test this ticket.
  6. Abir Mukherjee 2017-05-25

    [~annakozy@direcciona.me] Can you please provide demo code? I'll be validating this ticket.
  7. Hans Knöchel 2017-05-26

    Test-Case:
       var fb = require('facebook');
       
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
        
       var btn = Ti.UI.createButton({
           title: 'Register for push'
       });
       
       Ti.Network.addEventListener('remote', function(e) {
           fb.logPushNotificationOpen(e.data, 'actionId');
       });
        
       btn.addEventListener('click', function() {
           Ti.Network.registerForPushNotifications({
               types: [ Ti.Network.NOTIFICATION_TYPE_BADGE, Ti.Network.NOTIFICATION_TYPE_ALERT, Ti.Network.NOTIFICATION_TYPE_SOUND ],
               success: function(e) {
                   facebook.setPushNotificationsDeviceToken(e.deviceToken);
               }
           });
       });
        
       win.add(btn);
       win.open();
       
    Expected behavior: No crash! Everything else is handled internally by Facebook.
  8. Eric Merriman 2018-08-06

    Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source