Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4589790
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T22:08:21+00:00 2026-05-21T22:08:21+00:00

I’m am working on a facebook app where we just ask for a message

  • 0

I’m am working on a facebook app where we just ask for a message in one textarea. Right now we request extended permissions directly after the user likes the page (the app is hidden until the user likes the page). We want it to be on submission of the form instead.

Is there a way to load the permissions dialog in a popup style div (not a new window…jquery.load?) and use a script page as my callback uri and post my data without reloading the tab? I’ve done this if with normal forms, but we need to grab the name/pic/email/bday from FB to drop into the database.

Any help, even a nudge in the right direction would be very appreciated!

/** UPDATED **/

Wanted to update with what I came up with, which uses all current SDKs. I tried to make it as template-y as possible so others can use it.

$("#submit").live('click',function() {
    if (someErrors === true) {
        // handle errors
    } else {
        FB.login(function(response) {
            if (response.session) {
                if (response.perms) {
                    FB.api('/me', function(response) {
                        // vars: response.session.uid, response.name, response.email, response.birthday, etc
                        // serialize data here for post
                        $.post("process.php",formData,function(data) {
                            if (data.error) { 
                                // send json encoded error messages back to retrieve here like below:
                                // PHP: echo json_encode(array("error"=>"fail"));
                            } else {
                                /**
                                send data back json encoded:
                                PHP: echo json_encode(array("yourData"=>"{$yourData}","fb_id"=>"{$fb_id}","name"=>"{$name}"));
                                Now we have data like:
                                var profile = 'http://www.facebook.com/profile.php?id='+data.fb_id;
                                var image = '<img src="http://graph.facebook.com/'+data.fb_id+'/picture" />';
                                var yourData = data.yourData;
                                **/
                            }
                        }, "json");
                    });
                } else {
                    // more errors
                }
            } else {
                // and more errors
            }
        }, {perms:'email,user_birthday'}); // request your specific permissions here
    }
    return false;
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T22:08:21+00:00Added an answer on May 21, 2026 at 10:08 pm

    I had to do the same thing. I came up with this:

    $("#fb_login").click(function(){
    
                FB.login(function(response) {
                        if (response.session) 
                        {
                            if (response.perms)
                            {
                                  //alert("logged in..granted");
                                 var uid = FB.getSession().uid;
                             FB.api(
                            {
                                 method: 'fql.query',
                                 query: 'SELECT name,email,pic FROM user WHERE uid=' + uid
                            },
                            function(response) {
                             var user = response[0];
                                  $.get("addUser.php", { name: user.name, fbid: uid ,email: user.email }, function(data){
                                  // ajax call to addUser.php to insert into database.
    
    
                                } );
                                }
                                );
                            } 
                            else 
                            {
                                // alert("Since You Have Not Granted Permissions For Accessing E-mails, You Can't register for any of the events.");
    
                            }
                        }
                        else
                        {
                             //alert("Not Logged In");
                        }
    }, {perms:'publish_stream,email'}); // the extended permissions have to be specified here.
    
    

    You can modify the above script to suit your changes. 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.