开发者

facebook javascript api get user email

I am trying to fetch facebook user email for my app. But when i query the email address is returned as null. Forums suggest that the user should grant the email permission to your app. How to make user grant that permission or ask him what fields will he give access to the application. I a开发者_StackOverflow中文版m able to get name but not email from the code below.

 FB.api(
    {
      method: 'fql.query',
      query: 'SELECT name, email FROM user WHERE uid='+FB.getSession().uid
    },
    function(response) {
          alert(response[0].name);

    }
  );


its prettry simple my dear just take permission at the time of login.

<fb:login-button perms="email" autologoutlink="true"></fb:login-button>

and take other permissions in perms with comma seperated values. I hope it will help

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜