IBM Worklight - Combine Facebook SDK Java code in

2019-08-13 02:18发布

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.

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

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

enter image description here

1条回答
在下西门庆
2楼-- · 2019-08-13 02:39

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

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

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).

查看更多
登录 后发表回答