Cordova / phonegap跟踪APPs安装与Facebook SDK [英] Cordova / phonegap tracking APPs install with Facebook SDK

查看:86
本文介绍了Cordova / phonegap跟踪APPs安装与Facebook SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

相关问题:如何在Phonegap / Cordova项目中实施Facebook Mobile安装广告跟踪?



我有一个工作的cordova / phonegap应用程序。我想使用插件Facebook跟踪APP安装。我安装了cordova facebook连接插件:

  cordova插件添加https://github.com/phonegap/phonegap-facebook- plugin.git --variable APP_ID =myappid - 变数APP_NAME =myappname

插件已被安装并且可以用作这个报告'真':

  alert('fb plugin available:'+ typeof facebookConnectPlugin!='undefined ')

然而,我在Facebook开发者部分的最近记录的事件中没有看到任何内容对于这个应用程序我在设置中添加了正确的包名称和类名称,但事件不仅仅显示出来。



有没有什么我缺少或更多的信息,我可以提供?我找不到一个很好的教程,解释了完整的过程。



应用程序中是否应该通过在插件中添加任何JS调用来记录APP安装事件?

解决方案

我在插件实现中挖了一点,注意到 activateApp 根本没有实现。我克隆了repo并添加了Android的功能[在针对Android的FB指南]:



代码所需的修改是:插件中的代码更改和:如何在JS代码中使用。这样我可以调用

  facebookConnectPlugin.activateApp(fb_success,fb_fail); 

其中回调只是虚拟空函数。



,当有安装时,FB是SDK轨道。但是我注意到事件只有在设备上安装了FB应用程序时才会生成[不知道是否应该是这样的]。



更新
可能我的解决方案是旧的,我想现在Facebook的官方插件已经直接实现了这个功能,而不需要在JS文件中任何额外的定制或者触摸Java文件。 p>

Related question: How do I implement Facebook Mobile Install Ad tracking in Phonegap/Cordova project?

I have a working cordova/phonegap application. I would like to track the APP install using the plugin facebook. I installed the cordova facebook connect plugin with:

cordova plugin add https://github.com/phonegap/phonegap-facebook-plugin.git --variable APP_ID="myappid" --variable APP_NAME="myappname"

The plugin is installed and usable as this report 'true':

alert('fb plugin usable: ' + typeof facebookConnectPlugin != 'undefined')

However I am no seeing anything in the "Most recently logged events" in the facebook developer section for this app. I added the correct Package Name and Class Name in the settings but the events are not just showing up.

Is there anything that I am missing or more info that I can provide ? I cannot find a good tutorial on this that explains the full process.

Should the APP install event just be logged by adding the plugin without any JS call in the app?

解决方案

I dug a bit in the plugin implementation and noted the activateApp was not implement at all. I cloned the repo and add the functionality for Android [following the FB guide for android ]:

The modifications required on the code are: code changes in plugin and : how to use in the JS code. In this way I can just call

facebookConnectPlugin.activateApp(fb_success, fb_fail);

where the callbacks are just dummy empty function.

and the FB is SDK tracks when there is an installation. I noticed however that the events are generated only when there is a FB app installed on the device [do not know if this is supposed to be like that].

UPDATE Probably my solution is old, I guess that now the official plugin for Facebook has already the feature implemented directly without the need of any additional customization in the JS files or touching the Java files.

这篇关于Cordova / phonegap跟踪APPs安装与Facebook SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆