May 23, 2011

Facebook API ME & HTMLComponent: Not going well.

Hi, all

Yesterday, I took the day to work on my new project: Facebook API ME. The development is going well, btw. As I explained in the previous posts, the great challenge of this project is the authentication process, since it requires certain browser integration, which is not a trivial thing considering Java ME.

Anyway, the API is now working properly using Browser component from eSWT library. eSWT is available in most Nokia and Sony Ericsson devices. I intend to release it for developers this week. I will let you guys know.

Regarding LWUIT integration, using HTMLComponent, the work is not going so well. HTMLComponent is not working well with Facebook's authentication pages. Actually, it works well on login page, where the username/password are informed. On the other hand, the page where the user authorizes the app to access his account is not displayed properly. HTMLComponent is not able to display the "Accept" and "Deny" submit buttons. Because of that, the authentication process is not complete.

I tried to check out LWUIT's latest source code from SVN repository, but it seems they are refactoring the code for some reason. There is an error in one of the classes. Because of that, I was not able to generate a jar file. Is there anybody here that could help with that?

I also intend to work on Blackberry integration, using BrowserField component. But as I am not a Blackberry expert, I have to study a little bit to understand how it works so I can work with it.

I let you guys posted.

See you in the next post...

4 comments:

hello,world said...

hi,I have checked the lwuit files, and I run the demo,it's able to display the "Accept" and "Deny" submit buttons.
but if I clicked the "allow" button, it seems that the cookies was not been send well and facebook took me to the login page.
If need, I can send you code.

hello,world said...

and I just want to share some text to facebook,how should I make the code?

Ernandes Mourão Júnior said...

Hi,

That's the same behavior I got during my tests using LWUIT 1.4 and latest updates from SVN repository. On the other hand, I have not tried it with LWUIT 1.5, have you?

To share some text, see the snippet code below:

Status status = new Status("Text goes here");

Dispatcher dispatcher = Dispatcher.getInstance("Access Token goes here");
dispatcher.dispatch(status); //synchronously

//or dispatcher.addToQueue(status); //asynchronously

For further details, check this post here: http://j2megroup.blogspot.com/2011/06/facebook-api-me-10-tutorial.html

Regards,

Selva.G said...

Hi,
I'm trying to login the facebook page using LWUIT 1.5 svn. But while pressing the login button we are getting below error

1) iframe tag does not support XHTML-MP1.0
2) outofmemory error while running HTMLComponent rebuildpage()

News

Loading...