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
Highlighted
New Contributor
Posts: 9
Registered: ‎08-09-2013
My Device: BlackBerry Z10
My Carrier: Proximus
Accepted Solution

BB10 + Phonegap 3.0.0 + Facebook

Hi,

 

I'm trying to develop an app with Phonegap 3.0.0 and have to add the possibility to post a message on Facebook. I figured that the best way to go was to create a plugin in order to be able to invoke the native Facebook app. But that hasn't been a great success so far.

 

First I tried to test the plugin system with the basic Echo plugin (as seen in the Phonegap docs). I downloaded it, added the plugin, added the code and tried to run it on device. Unfortunately I get the 404 error when trying to test the echo, but the plugin seems to init correctly. Any suggestions?

 

And is there some other way to invoke native Facebook sharing in Phonegap?

 

Thanks!

Retired
Posts: 518
Registered: ‎07-18-2011
My Device: Bold
My Carrier: Rogers

Re: BB10 + Phonegap 3.0.0 + Facebook

Can you tell me which guide you used for this, because I know there were changes made recently.

 

Also what is the "404 error" ?



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BB10 + Phonegap 3.0.0 + Facebook

You should be able to use the existing invoke plugin to do this. Have you tried that yet?

Tim Windsor
Open Source Technical Lead
New Contributor
Posts: 9
Registered: ‎08-09-2013
My Device: BlackBerry Z10
My Carrier: Proximus

Re: BB10 + Phonegap 3.0.0 + Facebook


jeffheifetz wrote:

Can you tell me which guide you used for this, because I know there were changes made recently.

 

Also what is the "404 error" ?


Hi,

 

The error: POST http://localhost:8472/Echo/echo 404 (OK) 

That's with the Echo plugin example.

New Contributor
Posts: 9
Registered: ‎08-09-2013
My Device: BlackBerry Z10
My Carrier: Proximus

Re: BB10 + Phonegap 3.0.0 + Facebook


twindsor wrote:

You should be able to use the existing invoke plugin to do this. Have you tried that yet?


Hi,

 

Well, I've installed the invoke plugin like you suggested, but haven't had the time yet to test it. Do you have a small code example, if possible? Then I can do a quick test in the morning. Thanks!

Retired
Posts: 856
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: BB10 + Phonegap 3.0.0 + Facebook

There's some information and and example linked here: http://devblog.blackberry.com/2013/02/twitter-and-facebook-cards/

 

The values you can post, though the code is different, are shown here: https://developer.blackberry.com/cascades/documentation/device_platform/invocation/facebook.html

 

Also, regarding plugins for PhoneGap, we have a template being reviewed for release to GitHub. It does more than the Echo thing so it should be a more valuable starting point. I would guess it will go live sometime next week - when more people are back from vacation to review it.

Tim Windsor
Open Source Technical Lead
New Contributor
Posts: 9
Registered: ‎08-09-2013
My Device: BlackBerry Z10
My Carrier: Proximus

Re: BB10 + Phonegap 3.0.0 + Facebook

It worked! Thx!