Code Monkey home page Code Monkey logo

Comments (6)

davejohnson avatar davejohnson commented on August 23, 2024

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.

pamelafox avatar pamelafox commented on August 23, 2024

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.

davejohnson avatar davejohnson commented on August 23, 2024

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.

sagivo avatar sagivo commented on August 23, 2024

having the same problem. uid returns "..." on the response

from phonegap-facebook-plugin.

wturnerharris avatar wturnerharris commented on August 23, 2024

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.

wturnerharris avatar wturnerharris commented on August 23, 2024

@stevengill or @davejohnson - Any ideas on the issue above? Should i start a new thread?

from phonegap-facebook-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.