Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 23
Registered: ‎02-09-2011
My Device: Torch 9800
My Carrier: Telus

Re: facebook login in a WebWorks app

Yes you can use native UI in your plugins. 

 

I don't fondamentally know how webworks... works, but I guess it's a simple implementation of browserfield objects, loading the standard html pages...

 

The way the facebook SDK works is simply pushing a screen on top of the html page loaded by facebook.

 

You are correct, this is the exact way I use the extension. In your native code, you could simply create an other class that is called by your plugin manager, and then I beleive you can do pretty much what you want... I did something similar with the BB PrefsStorage classes.

 

Maybe you can't invoke your entire previous BB java project... try to import what you need. Also I don't have much experience with a "true" java BB project... I worked more on how to extend phonegap with native code, in the context of a webworks application.

Regular Contributor
Posts: 76
Registered: ‎02-17-2010
My Device: Storm
My Carrier: Vodafone

Re: facebook login in a WebWorks app

Hello everyone.

  I created a Java extension for WebWork.

  However, the extension does not work.

  I have a doubt.  Running the Java project in the simulator a screen of acceptance of permits and Facebook login screen appears in the simulator.  (It´s ok).

 But, When I run the Java extension from the WebWork, Java code can overlay the screen permits, put it in the foreground??   

  Thank you very much, kind regards.

New Developer
Posts: 23
Registered: ‎02-09-2011
My Device: Torch 9800
My Carrier: Telus

Re: facebook login in a WebWorks app

I used the Facebook SDK 0.3.5 because I could not make the latest one work Smiley Tongue

 

The 0.3.5 version works with the simple pushScreen, popScreen methods with the screen class.

 

What version of the SDK are you working with?

Regular Contributor
Posts: 76
Registered: ‎02-17-2010
My Device: Storm
My Carrier: Vodafone

Re: facebook login in a WebWorks app

New Developer
Posts: 23
Registered: ‎02-09-2011
My Device: Torch 9800
My Carrier: Telus

Re: facebook login in a WebWorks app

So i guess you use the latest version!

 

Be careful not to mix phonegap and Facebook, you only use the plugin system of phonegap.

 

Just create a java class that manages login/logout and session. You have to manually handle your token in order to retreive data from page to page.

Regular Contributor
Posts: 76
Registered: ‎02-17-2010
My Device: Storm
My Carrier: Vodafone

Re: facebook login in a WebWorks app

 Oh, I am trying to understand.

 

 The Facebook BB SDK is 0.5.12.   and you suggest to use the 0.3.5 ??

 

 In the other hand, I download the SDK, I understand the "strawberry tests" and I create a java class with one only method, login to facebook.

 

( I test the Java project. I create the .jar. Import into a "hello world" webwork project and try.  The webwork invoke directly the extension.  The permissions screen doesn´t apper  Smiley Sad   

It will be solve using 0.3.5 SDK instead 0.5.12???

)

 

Thanks.

New Developer
Posts: 23
Registered: ‎02-09-2011
My Device: Torch 9800
My Carrier: Telus

Re: facebook login in a WebWorks app

Did you package phonegap in the .jar ?

 

Did you write the javascript file needed to add phonegap plugins ?

 

Did you extend the Plugins class correctly ?

 

Because I really explained it all on my big post. I can't really help you more than that Smiley Tongue

Regular Contributor
Posts: 76
Registered: ‎02-17-2010
My Device: Storm
My Carrier: Vodafone

Re: facebook login in a WebWorks app

 .......  I need to read again your big post.  I can´t understand correctly  

 

 I only use BB SDK in the Java project.

 

Thanks.

New Developer
Posts: 23
Registered: ‎02-09-2011
My Device: Torch 9800
My Carrier: Telus

Re: facebook login in a WebWorks app

New Contributor
Posts: 3
Registered: ‎12-03-2010
My Device: Not Specified

Re: facebook login in a WebWorks app

One question ..Are you using similar code to invoke the UIAppcaition in your plugin java code ??

 

         ZoomableImageApp theApp = new ZoomableImageApp();
         theApp.enterEventDispatcher();

 

This code is generally in main method of BB java project.