Git Product home page Git Product logo

cordova-plugin-fbsdk's People

Contributors

antonfire avatar aogilvie avatar blaind avatar dokterbob avatar dtritus avatar dudeofawesome avatar gabrielctroia avatar goya avatar grmmph avatar jcvalerio avatar jeduan avatar jkassis avatar jkervine avatar josemedaglia avatar keab42 avatar levsa avatar matiasleidemer avatar matiassingers avatar maximbelov avatar mixtmeta avatar mkorganashvili avatar ngumby avatar noahcooper avatar pamelafox avatar peterpeterparker avatar pragunvohra avatar robertarnesson avatar shazron avatar simllll avatar stevengill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-fbsdk's Issues

Can't file custom events on Events Manager

Thanks for this plugin,
I am in middle of implementing this plugin in my quasar framework app. The intent is Performance Analytics, Campaign Tracking, etc. Currently using V1(quasar framework) and V3(capacitor)

Although, I have installed the plugin in capacitor and it tracks the events in events manager on Facebook. It only tracks Activate app and App installs events. When I fire custom events as the per the documentation, the message is a success but it doesn't log any custom events.
I am not sure, what am i missing here and how can i log custom events using this plugin.

App Events on iOS > 14.0 are not being sent

Bug or feature request

[x] I'm reporting a reproducible issue with the code

Describe the Bug of feature request

Facebook App Events are not being submitted on iOS >14.0 devices & simulators. Event Logging works on pre-14.0 devices & All Android Devices.

Expected Behavior

Events should be logged after setAdvertiserTrackingEnabled succeeds. and the flags are set.

Sample repo

Info.Plist

	<key>FacebookAutoLogAppEventsEnabled</key>
	<true/>
	<key>FacebookAdvertiserIDCollectionEnabled</key>
	<true/>

	<key>NSUserTrackingUsageDescription</key>
	<string>Kampanya ve reklam özelleştirmesi için</string>

Plugin version, OS, devices, etc

Ionic Capacitor
"@ionic/angular": "^6.3.8",
"@capacitor/ios": "^4.5.0",
"@awesome-cordova-plugins/facebook": "^6.2.0",
"cordova-plugin-fbsdk": "^4.0.2",

Devices:
iPhone 13 Simulator - iOS 16.1
iPhone 13 Device - iOS 16.4

Additional Context

  async setTrackingEnabled(enabled: boolean) {
    if (!this.platform.is("capacitor")) return;
    try {
      await this.facebook.setAutoLogAppEventsEnabled(enabled);
      console.log("setAutoLogAppEventsEnabled sucess =>");
    } catch (error) {
      console.error("setAutoLogAppEventsEnabled err =>", error);
    }
    try {
      await this.facebook.setAdvertiserIDCollectionEnabled(enabled);
      console.log("setAdvertiserIDCollectionEnabled SUCCESS =>");
    } catch (error) {
      console.error("setAdvertiserIDCollectionEnabled err =>", error);
    }
    if (this.platform.is("ios")) {
      try {
        await this.facebook.setAdvertiserTrackingEnabled(enabled);
        console.log("setAdvertiserTrackingEnabled SUCCESS =>");
      } catch (error) {
        console.error("setAdvertiserTrackingEnabled err =>", error);
      }
    }
  }

All the callbacks result with success.

Android: GameRequestDialog

from cordova-plugin-facebook-connect#119

@lossenorod

Hi, i recently switched from cordova-plugin-facebook-connect to your forked version cordova-plugin-fbsdk. I'm stuck on one issue with callbacks from GameRequestDialog that doesn't work on Android. I found out that this issue starts in FBSDK 12 and above. FBSDK 11.3 works properly. Do you have any idea maybe what can cause this? Thank you

EXC_BAD_ACCESS on redirecting from Share Modal

Please do not submit support requests or "How to" questions here. Instead, please use channels like StackOverflow, the Ionic forum or the Ionic slack channel

For issues or feature requests related to the code in this repository file a Github issue and provide as much details as possible

Bug or feature request

[✓] I'm reporting a reproducible issue with the code
[ ] I'm reporting a feature request

Describe the Bug

When trying to redirect back to the parent application, code execution is stopped with the error - Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)

Expected Behavior

Redirect successfully completes and the parent application continues to execute normally. In the case of a modal instead of a native share, the modal would successfully close.

Sample repo

You can use the cordova-plugin-fbsdk-lab to reproduce your issue.

Plugin version, OS, devices, etc

Plugin Version v.4.0.4 on all iOS devices I've tried, but mostly have been using an iPhone 14 Pro Max running iOS 16.6. Using v16.0.1 - v16.1.3 seems to be affected by this.

To replicate this issue, you can start up the Lab Project and start it as normal. Login will work, however the Facebook Share as well as the Game Requests seem to be broken.

Additional Context

I've been working on this for a day or two, I wanted to try and take care of the share issue myself since it doesn't appear that this repo is supported by an organization, and is the work of individuals which is very much appreciated.

One piece of documentation that I ran into that might be helpful is the Facebook iOS Getting Started Page. Step 3 mentions changing the AppDelegate to include some additional code, but it doesn't appear that the app delegate isn't modified in our case. It seems like this should either be handled by the plugin, or mentioned on the README for the IOS getting started section of this repo. Sadly, I wasn't able to get this code to work, since it appears to be written in a different language and I'm not a Swift Developer, and the syntax seems to be different enough that I didn't feel capable of modifying the library.

I've included a video showing the hang of the modal. I don't think it will be too helpful, but wanted to include it regardless. One other note is that in your lab project, the href doesn't appear to be passed through to facebook, but in a pure Cordova application I didn't see that issue.

The Thread 1 EXC_BAD_ACCESS appears to be thrown by UIApplicationMain, which seems to just be the main function for the app. Again, this is sadly not my wheelhouse, I wish I could be more help. If you have additional questions, please feel free to ask!

Showing.FB.Starter.modal.execution.hang.mov

LOGIN PROBLEM

I've been struggling for days with this problem:

To try it:
I use the function inside the click function of a button:

document.addEventListener('deviceready', onDeviceReady, false);

function onDeviceReady() {
// Other codes present in the onDeviceReady function...

var fbLoginSuccess = function(userData) {
alert("UserInfo: ", userData);
facebookConnectPlugin.getAccessToken(function(token) {
alert("Tokens: " + tokens);
});
}

facebookConnectPlugin.login(["public_profile"], fbLoginSuccess,
function(error) {
alert ("error" +error)
}
);

// Other codes present in the onDeviceReady function...
}

If the Facebook for Android app is NOT installed, a popup opens asking you to log in and everything works as it should.

THE PROBLEM:

If the native Facebook application is installed, a popup opens with this error.

facebook_problem

Thanks for any response, I've been stuck for days

Facebook Login on Android doesn't work when Cordova Activity is destroyed due to low memory

When an Android device is low on memory, the Cordova activity may be destroyed in the background when the Facebook Login activity opens. After a successful login, Android re-launches the Cordova activity using the process described at the link below. But the result of the Login Activity isn't handled correctly by the Cordova Facebook plugin. The documentation at the link below describes the methods that can be used by Cordova plugins to correctly handle this situation.

https://cordova.apache.org/docs/en/11.x/guide/platforms/android/plugin.html#launching-other-activities

To test the low memory behavior, enable the "Don't keep activities" option at: Developer Options > Apps > Don't keep activities

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.