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

  • Home
  • SEARCH
  • 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 6898007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:14:30+00:00 2026-05-27T07:14:30+00:00

I have a page tab application and i want it to Request for Permission

  • 0

I have a page tab application and i want it to Request for Permission (to use user’s email) the first time a user visits the tab.
I thought this should be simple enough, but i’ve been lost in hundrends q&a’s, tutorials, php/js apis, old and new methods/functions/techniques.
I ‘m not even sure which is the right way to suit my needs.

What my app is doing is as simple:

if (user_has_liked_page())
    include ("fan.php");
else
    include ("guest.php");

What i’m trying to do is have this fb “popup” that requests for permission – preferably only for users that like the page.

I kindly ask you not to just reply with all the urls of the facebook docs/api, I’ve tried many of them.

If possible i’d like to know which of all these techniques is the right one for the situation.
Examples are welcomed too.

Thanks in advance.

  • 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-27T07:14:31+00:00Added an answer on May 27, 2026 at 7:14 am

    For a JS solution you could try something similar to the following in your fan.php file

    <div id="fb-root"></div>
    <script>
    window.fbAsyncInit = function() {
    FB.init({
      appId      : 'YOUR_APP_ID', // App ID
      channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      oauth      : true, // enable OAuth 2.0
      xfbml      : true  // parse XFBML
    });
    
    // Additional initialization code here
    };
    
    // Load the SDK Asynchronously
    (function(d){
     var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     d.getElementsByTagName('head')[0].appendChild(js);
    }(document));
    </script>
    
    <button id="fb-login">Login & Permissions</button>
    
    <script>
    document.getElementById('fb-login').onclick = function() {
    var cb = function(response) {
    if (response.status === 'connected') {
      //user is logged in here and you have email scope already
    } else {
      alert('Click the "Login and Permissions" button so we can send you emails');
    }
    };
    FB.login(cb, { scope: 'email' });
    };
    </script>
    

    The contents of channel.html should just be

     <script src="//connect.facebook.net/en_US/all.js"></script>
    

    I haven’t had time to test this and I lifted most of this from the official docs. I know you said you didn’t want links. But you might find this page useful

    https://developers.facebook.com/docs/reference/javascript/

    and there is also a test console where you can play around with the javascript api located here

    https://developers.facebook.com/tools/console/

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

Sidebar

Related Questions

In my Tab Bar application, I want the user to have a list of
I have several tabs in my application, and each tab loads a different sub-page
I have a jQuery tab, and this is my code: $(document).ready(function() { //When page
I want to switch an image under Facebook page's tab (static FBML application), but
I have this facebook application which adds a custom tab to fan pages. You
I have Tab Based Application where i want to Reload the Tab activity when
I have created a business page on facebook and added application to a tab.
I have silverlight application. What I want is. If my user clicks on Button
I have developed one Facebook Application. In facebook, page tab url I have specified
I have Page Tab App, which has a landing page with a Log In

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.