How to get PhoneGap Facebook Connect plugin working
I have a complete Android app written in Dreamweaver CS 5.5 using PhoneGap (Now ECLIPSE). I am one small step away from releasing this great app to the Android Market. I simply want a "Share On Facebook" button that allows the user to post some info from the app along with a link to the app on the Android Market.
I am trying to use the new PhoneGap Facebook Connect plugin, which is supposed to work with just a few lines of code. https://github.com/davejohnson/phonegap-plugin-facebook-connect
Does anyone have this pl开发者_如何学Pythonugin working in Dreamweaver? Or does anyone have it working AT ALL? I can't even find anyone with a success story through any IDE.
[UPDATE] I built my application completely in Eclipse now. I have set up my app_secret and app_id, and the buttons on the sample page respond to taps now.
- Login: Alerts "not logged in" (even though I am logged in to Facebook both through the app and the browser)
- Me: alerts "An active access token mst be used to query information about the current user. Type: OAuthException
- Get Session: Alerts "undefined"
- Get Login: Loads a facebook page in the browser which says "an error occurred. Please try again later"
- Logout: alerts "auth.statusChange event"
Any ideas?
In the PhoneGap Facebook Connect Plugin released by D Johnson you also need to include a small java part inside the android SDK.
As the description of the plugin says :
The Facebook SDK (both native and JavaScript) is changing independent of this plugin. The working version of the Facebook Android SDK is distributed with the plugin and as of writing ...
Unfortunalety this new Facebook Android SDK is not released as a jar, so you cannot easily drop it into you Android SDK installed on your machine.
When building your project, Dreamweaver would take this new library (which is addressed by the new phoneGap plugin) and your application would work.
That's where I am too, trying to find a way to include this small piece of java code inside the original SDK so that I can use it with phoneGap plugin too. I will post here if I succeed !
Found a work around: I have taken over the project under eclipse. I could then add some additional jar (facebook) and the project structure can be easily moved from DW (index.html + js files).
There is a tutorial on how to do this here
FB connect works fine now in the emulator.
精彩评论