You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
Hi @JuanP6, I don't use the module but I think you have to call the constant on the declared variable of the module. If you have var social = require("dk.napp.social"); than you call it on social. ACTIVITY_FACEBOOK.
Hi @hansemannn,
Certainly! I am already doing that.
The problem is that the module's constants are not matching the actual name of the activity.
The value of Facebook's constant is UIActivityTypePostToFacebook.
But for instance, in iOS 9, the actual name of said activity is com.apple.UIKit.activity.PostToFacebook.
So in the callback, I can't really use the constants for operations.
Actual code snippet from my project:
//case Alloy.Globals.Social.ACTIVITY_FACEBOOK:
case "com.apple.UIKit.activity.PostToFacebook":
(...)
break;
And this is only for iPhones. For tables, the activity is a modal, and the event returns "com.facebook.Facebook.ShareExtension".
This is certainly iOS and Facebook's fault, it renders the module's constants useless.
Same for twitter.
Phones: "com.apple.UIKit.activity.PostToTwitter"
Tablets: "com.atebits.Tweetie2.ShareExtension"
Hey guys. Sorry for opening another issue, but I feel this one's important.
According to the README there are some constants for the callback, depending on the type of share you select.
Let's take Facebook as an example.
ACTIVITY_FACEBOOK: UIActivityTypePostToFacebook
But when evaluating this on runtime:
case dk.napp.social.ACTIVITY_FACEBOOK:
Ti.API.info("User shared on Facebook");
break;
...I never get into the selected case.
After debugging I discovered the Activity Name differs a little, not only from the constant but also between devices.
For iPhone: com.apple.UIKit.activity.PostToFacebook
For iPad: com.facebook.Facebook.ShareExtension
[INFO] : {
[INFO] : activity = 383813760;
[INFO] : activityName = "com.facebook.Facebook.ShareExtension";
[INFO] : bubbles = 1;
[INFO] : cancelBubble = 0;
[INFO] : platform = activityPopover;
[INFO] : source = "[object DkNappSocialModule]";
[INFO] : success = 1;
[INFO] : type = complete;
[INFO] : }
Probably UIActivityTypePostToFacebook is from older versions of the Facebook app and also iOS.
Same happens for Twitter, and even the Mail app.
I hope this is helpful as a report. Thanks!!
The text was updated successfully, but these errors were encountered: