Comments (6)
The problem is that fb doesn't return the uid to the native sdk. The best thing to do is to make a call to the graph API for /me.
I thought that I actually fixed this in the plugin ios native code (FacebookConnect.m line 127 I think) but I will have another look.
from phonegap-facebook-plugin.
Ahhh, okay. Getting /me works, thanks. Assuming many people want the UID for identification on their database, it'd be useful to include that in the example, I think.
Here's the code I use:
FB.login(function(response) {
if (response.session) {
FB.api('/me', function(response) {
// Send response.id to my own server to find user in database
});
} else {
alert('Facebook login failed. :(');
}
}, {perms: 'user_birthday,email,user_location'});
from phonegap-facebook-plugin.
Duly noted! Will update that and see what happened to my fixes so that its
returned in the session object :/
On Oct 19, 2011 3:47 PM, "Pamela Fox" <
[email protected]>
wrote:
Ahhh, okay. Getting /me works, thanks. Assuming many people want the UID
for identification on their database, it'd be useful to include that in the
example, I think.Here's the code I use:
FB.login(function(response) {
if (response.session) {
FB.api('/me', function(response) {
// Send response.id to my own server to find user in database
});
} else {
alert('Facebook login failed. :(');
}
}, {perms: 'user_birthday,email,user_location'});Reply to this email directly or view it on GitHub:
https://github.com/davejohnson/phonegap-plugin-facebook-connect/issues/47#issuecomment-2462448
from phonegap-facebook-plugin.
having the same problem. uid returns "..." on the response
from phonegap-facebook-plugin.
I have this issue on iOS, but Android returns the userId as expected. The attempt is being made without a native Facebook app, so using the popup facebook dialog.
One difference beside receiving "..." instead of the actual userID value is that the naming of the object differs.
On Android, the object is "userId" and on iOS the object key is "userID."
Using phonegap 1.6.1 with plugin from github.
from phonegap-facebook-plugin.
@stevengill or @davejohnson - Any ideas on the issue above? Should i start a new thread?
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.