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
@@ -346,7 +348,7 @@ If the Messenger app is not installed, the Send button will be hidden. Be sure t
346
348
347
349
### Show Share Dialog Programmatically
348
350
349
-
**Note** The share dialog will try fallback to browse page sharing if user doesn't have Facebook installed (only for linkContent)
351
+
**Note** The share dialog will try fallback to browse page sharing if user doesn't have Facebook installed (only for linkContent)
350
352
351
353
```TypeScript
352
354
showShareDialog(this.linkContent);
@@ -594,6 +596,34 @@ The callback that have to be provided to Facebook.login method receives 2 argume
594
596
## Get Current Access Token
595
597
The plugin allows to get the current access token, if any, via getCurrentAccessToken() method.
596
598
599
+
## Basic Analytics
600
+
The plugin allows to log analytics events. At the initialization of the application you need to init analytics:
601
+
602
+
```Typescript
603
+
application.on(application.launchEvent, function (args) {
604
+
nsFacebook.init("{facebook_app_id}");
605
+
nsFacebook.initAnalytics();
606
+
});
607
+
```
608
+
609
+
Events logging:
610
+
611
+
```Typescript
612
+
nsFacebook.logEvent('Lead');
613
+
```
614
+
615
+
Logging event with parameters:
616
+
617
+
```Typescript
618
+
const value =5;
619
+
const parameters = [{
620
+
key: 'value',
621
+
value: value.toString(),
622
+
}];
623
+
624
+
nsFacebook.logEvent(FundsAdded, parameters);
625
+
```
626
+
597
627
## Graph API Example
598
628
Once the Facebook access token is retrieved you can execute Graph API requests. In the example below after successful login, the access token is stored in application settings. And then on the home view it is retrieved and 2 Graph API calls are executed.
0 commit comments