Worklight Facebook platform selection? - facebook

For Facbook integration in Worklight which platform should we select Android or Website
,
right now i am developing for android environment but later i will be doing for iphone and windows as well
Also were do i place the Facebook integration code in index.html(main) or in android project which is separately created ?
i am confused do reply

It looks like you are developing a Worklight-based Hybrid application, so in this case you should actually opt for the Facebook JavaScript SDK.
You can add it to your common\js folder and reference it in the common\index.html (just follow the instructions Facebook probably provides). This way you could easily 'extend' it to whichever additional environments you will add in Worklight Studio in your project setup.
Of course, you can also choose to use Facebook's native SDKs for each environment in your Hybrid application. In this case, you'll need to add the SDK in the iphone-ipad-or-android\native folder and follow Facebook's integration instructions (note that for iPhone the actual integration will be done in Xcode, not Eclipse).
If you choose to create a native application and bundle it with the Worklight SDK, then you should opt for the Facebook SDK dedicated to the specific OS. Here, you will add the SDK, again, by following Facebook's instructions.

Related

react-native-fbsdk for Windows app

I am using react-native-fbsdk for my React Native Project.
It is working fine for Android and iOS , as I followed the steps mentioned on their official site. https://developers.facebook.com/docs/react-native
But, there are no resources for fbsdk Windows integration.
Is it possible to integrate fbsdk with Windows react-native app ?
Depending on what features you want, we ported some of the react-native-fbsdk features for the F8 Developer Conference app here:
https://github.com/ReactWindows/f8app/tree/master/windows/F8v2/FBSDK
And we leveraged a shared wrapper around the FB SDK that encapsulated the slight differences in the API:
https://github.com/ReactWindows/f8app/blob/master/js/FacebookSDK.js

Website launching in Worklight iPhone App WL Object is not defined

I am having an issue. Here is the background of App. Currently, I am opening website into Worklight App. So, my all declarations of WL(object) are defined at website. Because of having the same structure of resources website opened in worklight app suppose to be working fine. My app is working good in Android but for iPhone it's not detecting WL object.
Any Ideas?
What you are describing, "loading worklight in an external website" is really not a supported scenario and not how MobileFirst was meant to be used. I am surprised it is working in Android at all.
The way you can load a "remote worklight-based 'app'" in your existing mobilefirst application is by using one of the following approaches:
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/advanced-topics/using-a-mobilefirst-application-as-a-container-for-server-generated-pages/
https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/advanced-topics/container-advanced-pages/

Call phonegap plugin function within web app

i am building my first phonegap app and when i open the app i instantly redirecting (window.location) the user to my server where my web app is hosted. Is it possible to load the phonegap plugins from there? Because the "deviceready" event is not firing and i cannot call any plugin functions.
I can confirm that loading remotely does appear to allow access to native components (when scripts are properly loaded) and that cordova.jsdoes not appear to need to be loaded by the local index.html bootstrap.
Short answer: Yes
Some 'gotcha's'
You will have to supply correct cordova.js version for the platform browsing to your site.
you can look here for more info https://github.com/apache/cordova-js. This project hosts the core js elements, and builds the platform specific cordova.js lib
Any plugin api's your app wants to interact with must be pre-installed into the Native App
any plugin with native code will have to be added to the project and deployed to device bundled inside the app. There is no way to lazyload native code. The js portions of the plugin could be hosted on your server, however.
More information, some apps that do this
The PhoneGap Developer App uses a similar technique to what is describe above and what you want. The only difference is that it is meant as a dev tool, and the server is a local dev machine.
The Cordova App Harness also uses this technique of pre-bundling an app package with plugins, to be consumed by remotely hosted resources
You cannot, deviceready only functioning if the app run on mobile phone environment only. If web based or dekstop application, it won't trigger.
No , dont do that . loading remote website will not able to intract with your plugins . and the app will get rejected on istore too

Phonegap's Facebook Connect plugin - making it work with web app as well as native apps?

I've got the FB Connect plugin working with my Phonegap project native apps, but now I'm wondering what the workflow is for making it work with the web-app version.
When I run the web-app version, I get the standard Phonegap FB Connect errors, the last one being 'FB variable does not exist. Check that you have included the Facebook JS SDK file.' - this makes sense, as my web app doesn't have those js files, as they get injected during the PG Build process.
So what is the typical way of moving forward at that point? Can I use that last error as a way of determining 'ok, this is the web-app version, not native', and then what do I do next? Should have the Facebook SDK installed on my web-app?
Cheers
The git repo has steps for including the plugin in web app
Web App
www/js/facebookConnectPlugin.js contains the JavaScript SDK and API file. The API matches as close as possible to the native APIs.
Setup Web App Example
Host the www folder on a server and configure your Facebook dashboard correctly to test the Web APIs. Most people use Parse for easy testing.
NOTE : Developers should call facebookConnectPlugin.browserInit() before login - Web App ONLY
https://github.com/phonegap/phonegap-facebook-plugin

Can we bundle Chrome installer with Packaged App?

We have built Packaged App for our Web Application.
Is it possible to provide Chrome installer in a Packaged App bundle or somehow trigger Chrome installation in the background from Packaged App.
Currently Chrome Browser is separate Dependancy for using Packaged Apps so it is difficult to convince Users to first install Chrome browser.
Also, people can install the App for any location as a complete package.
It's not possible yet, but you can star http://crbug.com/173762 to get notified when it does work.