Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Thanked 0 Times in 0 Posts

    obtain user login email address from facebook

    I am using tha facebook api to post to the wall. I want to get the email address of the user who shares the post on the wall. How to I do that? Its urgent.

    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">
    <title>My Feed Dialog Page</title>
    <div id='fb-root'></div>
    <script src='http://connect.facebook.net/en_US/all.js'></script>
    <p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
    <p id='msg'></p>
      FB.init({appId: "OURAPPID", status: true, cookie: true, frictionlessRequests: true});
      function postToFeed() {
        // calling the API ...
        var obj = {
          method: 'feed',
          link: 'http://www.ourdoamin.com/test.jsp',
          picture: 'http://www.ourdoamin.com/image.jpg',
          name: 'Test Article',
          caption: 'Here We GO',
          description: 'This is a test.'
        function callback(response) {
          document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
        FB.ui(obj, callback);

  2. #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    London, England
    Thanked 2,608 Times in 2,586 Posts
    I have no idea, but I would imagine that it was impossible for security reasons. If not, it would seem to be a serious security breach.

    It is your responsibility to die() if necessary….. - PHP Manual

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  3. #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 741 Times in 730 Posts
    Using that API you are only ever going to be able to obtain the information that the API makes available. I cannot imagine any reason why Facebook would make the email address available as a part of that data given the huge security issues that would create. In fact as far as I can see the only email references in the script relate to you passing an email address to the script.
    Last edited by felgall; 10-15-2012 at 10:41 PM.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  4. #4
    Regular Coder
    Join Date
    Apr 2012
    St. Louis, MO
    Thanked 101 Times in 101 Posts
    Not sure if it's a security breach, anymore. Facebook keeps changing their privacy policy, and has the integrated user experience, allowing people to LIKE things on other websites that will reflect in Facebook.

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts