[MOD-2321] iOS / Android: Facebook Push Campaigns
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-01-24T18:12:06.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | |
Labels | facebook, ios, pushcampains |
Reporter | Ganna Kozynenko |
Assignee | Hans Knöchel |
Created | 2017-01-19T19:31:05.000+0000 |
Updated | 2018-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-campaignsComments
- Sharif AbuDarda 2017-01-19 Hello, Thanks for the feature request. Can you create a PR on this? We will consider it.
- 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
- 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.
- 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)
- 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.
- Abir Mukherjee 2017-05-25 [~annakozy@direcciona.me] Can you please provide demo code? I'll be validating this ticket.
- Hans Knöchel 2017-05-26
Test-Case:
Expected behavior: No crash! Everything else is handled internally by Facebook.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();
- Eric Merriman 2018-08-06 Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.