Comments (29)
I can second this issue. I tried the examples using Eclipse and the Android emulator but no response. The init is called, and seems to work, but nothing else ever seems to happen. Also I do not get any authorize request dialog or anything like that.
I guess this plugin just doesn't work on Android (yet).
from phonegap-facebook-plugin.
init() also works for me but I get no response on on the actual login either using 2.3.3 (real device and sim). I can add that I see the below error in the console logger, as if I didn't update my plugins.xml file, but I have. I also installed the latest facebook app to the sim and my real device.
phonegap.1.0.0.js: Line 604 : Error: Status=2 Message=Class not found
from phonegap-facebook-plugin.
Another facebook plugin "jos3000-phonegap-plugins-7ed44f3" does work for me. Does anyone know if both projects will continue going forward?
from phonegap-facebook-plugin.
Hi - I am having the same issue as Viras. Init seems to fire but nothing else happens.
There is no errors in the consol ...
I am using Eclipse, SDK 3.0
Any help would be greatly appreciated!
from phonegap-facebook-plugin.
I caught the following when calling login on a device that does NOT have the Facebook app installed:
09-07 15:18:38.865: WARN/System.err(8170): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
09-07 15:18:38.865: WARN/System.err(8170): at android.os.Handler.(Handler.java:121)
09-07 15:18:38.865: WARN/System.err(8170): at android.app.Dialog.(Dialog.java:101)
09-07 15:18:38.865: WARN/System.err(8170): at android.app.Dialog.(Dialog.java:123)
09-07 15:18:38.868: WARN/System.err(8170): at com.facebook.android.FbDialog.(FbDialog.java:63)
09-07 15:18:38.872: WARN/System.err(8170): at com.facebook.android.Facebook.dialog(Facebook.java:622)
09-07 15:18:38.872: WARN/System.err(8170): at com.facebook.android.Facebook.startDialogAuth(Facebook.java:297)
09-07 15:18:38.876: WARN/System.err(8170): at com.facebook.android.Facebook.authorize(Facebook.java:195)
09-07 15:18:38.876: WARN/System.err(8170): at com.facebook.phonegap.ConnectPlugin.execute(ConnectPlugin.java:64)
09-07 15:18:38.876: WARN/System.err(8170): at com.phonegap.api.PluginManager$1.run(PluginManager.java:119)
09-07 15:18:38.876: WARN/System.err(8170): at java.lang.Thread.run(Thread.java:1096)
from phonegap-facebook-plugin.
@rsweny If this helps at all, that error means that the plugin isn't installed correctly. However, I don't know how to set it so that it is.
Also, how did you get the @jos3000 plugin to work?
from phonegap-facebook-plugin.
for jos3000 I pretty much just followed the readme included with it. Add to plugin.xml, include source code etc. I did get the latest version.. earlier versions had one line of js that broke in pg 1.0..something about registering a server.. anyway it needed to be deleted. This is the code I use on the client.
//FB plugin
function facebook_login()
{
var appId = "1234567890"; // this is your facebook app id change me
window.plugins.facebook.authorize(appId,function(res){
var fullname = res.name;
facebookName = res.first_name;
var last_name = res.last_name;
var email = res.email;
facebookId = res.id;
setCookie("fb",facebookId,20);
setCookie("fb_name",facebookName,20);
window.plugins.facebook.getAccess(function(res2){
var parameters = { email:email, name:fullname, first_name:facebookName, last_name:last_name, facebook_id:facebookId, facebook_token:res2.token };
createUser(parameters, createUserResponse);
facebookToken = res2.token;
});
});
}
from phonegap-facebook-plugin.
I did find this function is a bit iffy.. I can't seem to call it on its own without the authorize and if I call it before a get location request it hangs the location request.
window.plugins.facebook.getAccess
from phonegap-facebook-plugin.
Hi All,
I believe this is the official plugin for FB by phonegap, so i think this should work, has any one have a working example or proof of concept this plugin works, is very much appreciated. Any feedback from phonegap is very appreciated as well. Honestly i'm running out of numbers, cant figure where did it go wrong
@rsweny, u said jos3000 plugin is working? i would really appreciate if you could share your index.html with me [email protected]. am really running out of numbers. i tried that but to my futile. Many thanks
from phonegap-facebook-plugin.
just installed eclipse 3.7 / phonegap 1.0.0. Am running on android 2.3.3. Doest seem working at all, no response not even init(). Please advise, many thanks
from phonegap-facebook-plugin.
Hey, lawrence, I've gotten the other facebook plugin working, but am still
finishing the app, but afterwards (probably monday) i was going to post a
detailed howto on stackoverflow, can you wait that long?
On Sun, Sep 11, 2011 at 12:36 AM, lawrence101 <
[email protected]>wrote:
just installed eclipse 3.7 / phonegap 1.0.0. Am running on android 2.3.3.
Doest seem working at all, no response not even init(). Please advise, many
thanksReply to this email directly or view it on GitHub:
https://github.com/davejohnson/phonegap-plugin-facebook-connect/issues/17#issuecomment-2061773
from phonegap-facebook-plugin.
Heya Simon, yep definetly, any help of any kind is very much appreciate, the plugin u mentioned is it the official PG plugin or jos0003 or yours
from phonegap-facebook-plugin.
Hey guys - I was getting the same Class not Found error in the adb log for android, and noticed some inconsistencies in the package naming (sometimes it's com.phonegap.facebook..., sometimes it's com.facebook.phonegap..). When I changed the plugin.xml config from what is in the Readme to the following, it resolved all of those issues:
<plugin name="com.phonegap.facebook.Connect" value="com.facebook.phonegap.ConnectPlugin">
(Note the inverted package name in the "name" attribute value)
from phonegap-facebook-plugin.
Same here trying it in Xcode and iOS. Nothing happens when I click any of the buttons, with the exception of "Get session" which pops up the message "undefined"! I got to step 20, run the app, but there's no description of how it works or what it does. I take it this is a recent phenomenon??
from phonegap-facebook-plugin.
I seem to be running into a similar (and potentially related) issue. The plugin works great on iOS, but when I try to use the same JS codebase (with a different phonegap.js and the jars and java file, obviously) in an Android build project, nothing happens when I try to call any of the login or authorize methods. They seem to just silently fail. However, when I install the FB app from the market, everything works great. I'm trying to figure out if the issue is somewhere in my configuration, or in the FB sdk. According to their docs/code (https://github.com/facebook/facebook-android-sdk/blob/master/facebook/src/com/facebook/android/Facebook.java#L118), the SDK should fall back to a webview if it can't find the native app, but it doesn't appear to be doing so. Anyone have any wisdom or ideas on this one?
from phonegap-facebook-plugin.
The issue with the dialog is fixed in this file:
https://gist.github.com/1220776
Basically, you have to run the facebook authorize call inside the main UI thread by wrapping it in Runnable and calling this.ctx.runOnUiThread(runnable);
Also note, I borrowed the PreferenceManager code from @jos3000's plugin so that the app can be "re-authorized" on future launches. In order to take advantage of this, you will need to use the following modified version of pg-plugin-fb-connect.js:
https://gist.github.com/1220783
These files are compatible with the existing iOS plugin-- I'm currently working on the automatic re-authorization support for iOS.
from phonegap-facebook-plugin.
Awesome, that worked like a charm.
I'd be happy to package that up in a branch/pull requests, unless you're already working on it.
from phonegap-facebook-plugin.
Please do, thanks!
from phonegap-facebook-plugin.
Done - pull request is at https://github.com/davejohnson/phonegap-plugin-facebook-connect/pull/23
from phonegap-facebook-plugin.
Great work, jayzes! I can do the web dev stuff USING PhoneGap, but know nothing of Objective-C. That pull request makes absolutely no sense to me, so I suspect it will do the trick!
FYI I eventually found a workaround for posting status updates to Facebook... You send the user to Safari to fill in the form (or click Cancel/Skip) and they will then get redirected to your web page of your choice. My choice is a redirect page, which uses the "YourSchemeHere://index.html" iPhone cleverness to switch back your app. Job done!
from phonegap-facebook-plugin.
ptard's fix https://gist.github.com/1220776 worked great after I made sure that pg-plugin-fb-connect.js and plugin.xml all use the same namespace "com.phonegap.facebook" ;)
from phonegap-facebook-plugin.
hi guys, is this working now, anyone succesfully to try this on android, mine dont seem to be working, same old issue, though have patched ptard's pg-plugin-fb-connect.js.js and connectplugin.java file and changed all the neccesary namespace to com.phonegap.facebook,
from phonegap-facebook-plugin.
lawrence101, i'm having the same problem, i get back status:unknown when trying to get login status
from phonegap-facebook-plugin.
hi creatrix your are developing android environment or ios? i'm on android 2.3.3, seems not working for me, the least
from phonegap-facebook-plugin.
i'm on android and i have patched the files and updated the namespaces just like you. :(
from phonegap-facebook-plugin.
woohoo finally got the example working on android, PEBKAC :)
for me the problem was that i did not use the correct keytool cmd to generate the android hash key that i have to fill in on facebook
this is what i used to generate a key that worked
/usr/java/jdk1.7.0/bin/keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
it asks you for a password, i used "android"
i then added that key to my facebook app settings
then the example worked for me, try it and see if it does for you lawrence101
from phonegap-facebook-plugin.
Hi Guys, tried the plugin again, i'm developing using PG1.0.0 in android 2.3.3 environment. The plugin is once again working, perhaps you guys could try it out again, the functions are working pretty well, thanks to Dave on this. login, me, get session, get login status & logout is working. Just a hint remember to generate the hashkey and apply it at the FB dashboard as mentioned by creatrixcortis, and change the app_id and app_secret which ever files it applies. wish you guys luck on the development, so i'll just procedd to close this issue since the its resolve with the amount of support from the phonegap team - great product. was wondering if any one has a sample of posting/ sharing to the facebook wall using a childbrowser, perhaps you could share, would appreciate it very much.
from phonegap-facebook-plugin.
Does this plugin work with PG1.2.0 in android 4.0 environment?
from phonegap-facebook-plugin.
any updates?
Thanks
from phonegap-facebook-plugin.
Related Issues (20)
- Compile Error
- ErrorCode for ios
- Cordova iOS - Facebook Native App callback return issue?
- Turn Texas HoldEm Poker
- Facebook share link not working
- app crash on facebook re-login
- THIS REPOSITORY HAS BEEN ABANDONED. Use the jeduan fork instead!
- miss IOS instruction on documentation HOT 1
- Not Able to Validate Server Side Login Using AccessToken and Fetch Profile Information
- unable to list saved accounts on device
- You can't use Facebook to log into this app or website because there's an issue with its implementation of Facebook Login HOT 1
- Plugin doesn't work on my site
- TypeScript definition support
- UIWebView needs to be removed HOT 1
- Plugin for mobile version of site
- How i can get Deep Link?
- h
- Busco
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phonegap-facebook-plugin.