Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-15-2012, 08:20 AM   PM User | #1
jinu227
New to the CF scene

 
Join Date: Nov 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
jinu227 is an unknown quantity at this point
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.

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>My Feed Dialog Page</title>
</head>
<body>
<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>

<script> 
  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);
  }

</script>
jinu227 is offline   Reply With Quote
Old 10-15-2012, 08:30 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,036
Thanks: 197
Thanked 2,410 Times in 2,388 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
Philip M is online now   Reply With Quote
Old 10-15-2012, 09:38 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,451
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/

Last edited by felgall; 10-15-2012 at 09:41 PM..
felgall is offline   Reply With Quote
Old 10-15-2012, 09:57 PM   PM User | #4
WolfShade
Regular Coder

 
Join Date: Apr 2012
Location: St. Louis, MO, USA
Posts: 945
Thanks: 7
Thanked 97 Times in 97 Posts
WolfShade is an unknown quantity at this point
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".
WolfShade is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:11 AM.


Advertisement
Log in to turn off these ads.