IBM Worklight - 将Facebook SDK Java代码合并在Worklight应用程序中 [英] IBM Worklight - Combine Facebook SDK Java code in Worklight application

查看:255
本文介绍了IBM Worklight - 将Facebook SDK Java代码合并在Worklight应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用Facebook SDK for Android来登录Facebook并获取用户信息。当这样做时,所有代码都在 src / com.name / MainActivity.java 中。

I can use the Facebook SDK for Android to login with Facebook and get user information. When doing this all of the code is in src/com.name/MainActivity.java.

但是当使用工作灯,我现在编写的所有代码都在Worklight中,在 assest / www / default 中,MainActivity.java中没有任何内容。

But when using Worklight, everything I code is in Worklight now, in assest/www/default and nothing in MainActivity.java.

我的问题是,如果我在MainActivity.java中使用了Facebook SDK,那么如何在Worklight应用程序中使用它?

My question is, if I've used the Facebook SDK in MainActivity.java how can I use that in the Worklight app?

推荐答案

您可以使用在Worklight中创建Cordova插件(具体来说,此培训模块示例应用程序)。

First please familiarize yourself with creating Cordova plug-ins in Worklight (specifically, this training module and sample app).

这就是将您的本机代码集成到一个Worklight应用程序,通过使用Cordova插件。

That's how you should integrate your native code in a Worklight app, by using a Cordova plug-in.

否则,还有一个 Facebook为Cordova提供的官方插件(应与您在培训模块中学习的相同方式进行整合)。

Otherwise, there is also an official plug-in by Facebook for Cordova (which should be integrated in the same way as you learn in the training module).

这篇关于IBM Worklight - 将Facebook SDK Java代码合并在Worklight应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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