Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

[Feature, iOS] Allow hybrid apps to send AppEvents from the pixel #678

Closed
peterpeterparker opened this issue Jun 27, 2018 · 3 comments
Closed

Comments

@peterpeterparker
Copy link
Collaborator

Bug or feature request

[X] I'm reporting a feature request

Describe the feature request

Facebook iOS SDK 4.34.0 introduce, according its CHANGELOG, a new feature which might be interesting:

Added a JavascriptInterface and an augmentWebview method. This allow hybrid apps to send AppEvents from the pixel.

See https://developers.facebook.com/docs/ios/change-log-4x

In the SDK, the header file FBSDKAppEvents.h describe the function as following

#if !TARGET_OS_TV
/*
  Intended to be used as part of a hybrid webapp.
 If you call this method, the FB SDK will inject a new JavaScript object into your webview.
 If the FB Pixel is used within the webview, and references the app ID of this app,
 then it will detect the presence of this injected JavaScript object
 and pass Pixel events back to the FB SDK for logging using the AppEvents framework.

 - Parameter webView: The webview to augment with the additional JavaScript behaviour
 */
+ (void)augmentHybridWKWebView:(WKWebView *)webView;
#endif

Describe the goal of the issue

So if someone is interested by this subject (Facebook pixel and events) a would like to enjoy this new feature, sure don't hesitate to submit a PR, be my guest and ping me for review :)

Plugin version, OS, devices, etc

v2.2.0

msencer added a commit to msencer/cordova-plugin-facebook4 that referenced this issue Jan 6, 2019
@Cm-8
Copy link

Cm-8 commented Jan 10, 2019

Someone tried the modify of @msencer?
It works?
I've same request for my Hybrid App

@msencer
Copy link

msencer commented Jan 10, 2019

Someone tried the modify of @msencer?
It works?
I've same request for my Hybrid App

I'll update the PR according to @peterpeterparker's comments today, hopefully it will be merged soon enough :)

@peterpeterparker
Copy link
Collaborator Author

Thx @msencer for the PR, you are today's real MVP 👍

This feature has been released in v4.1.0

Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Lindsay-Needs-Sleep pushed a commit to miloproductionsinc/cordova-plugin-facebook-connect that referenced this issue Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants