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 7662483
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:48:52+00:00 2026-05-31T13:48:52+00:00

I have changed the way my facebook page tab app asks for permissions. I

  • 0

I have changed the way my facebook page tab app asks for permissions.

I was using the javascript approach with FB Dialog and now I am using the redirect approach (in which the user is redirected to a FB page where the permissions are asked and then is redirected back to the facebook page tab).

The reason of the change is that I believe this approach will present
less bugs and issues than using the javascript dialogs.

When using the redirect approach, I need to specify the URL that the user will be redirected after providing permissions. I would like that this url was the url of the facebook page tab with the app installed.

When building the url of redirect, I know the current page_id and my app_id. With these info, I need to build the facebook page tab url, which should look like this:

https://www.facebook.com/pages/PAGE-SLUG/{#APP_ID}?sk=app_{#APP_ID}

The problem is that I don’t know what is the PAGE-SLUG. The tests I have run with the url above (using the PAGE-SLUG as anything) end up redirecting to the correct URL. However, knowing that Facebook is a very unstable platform, I would like to know it there is any better approach to building this redirect url.

EDIT: the above approach has a problem. The redirect loses the SSL protocol and uses the HTTP link when the facebook user doesn’t use SSL by default.

  • 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-31T13:48:53+00:00Added an answer on May 31, 2026 at 1:48 pm

    It’s very simple actually, you can call the Graph API with PHP like so:

    $facebook->api("/{PAGE_ID}"); 
    // change {PAGE_ID} to the page id you are redirecting back to
    

    the return value is a json array with “link” in it -> that’s the URL you are looking for 🙂

    Example Return:

    {
      "id": "XXXXXXXXX", 
      "name": "My Demo Page", 
      "picture": "", 
      "link": "https://www.facebook.com/pages/My-Demo-Page/XXXXXXXXX", 
      "likes": 123456, 
      "category": "Product/service", 
      "can_post": true, 
      "type": "page"
    }
    

    You can also query by the page name, if you know it, for example:

    querying the Graph API with:

    $facebook->api("/coca-cola"); 
    

    Will result in:

    {
      "id": "40796308305", 
      "name": "Coca-Cola", 
      "picture": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/174560_40796308305_2093137831_s.jpg", 
      "link": "https://www.facebook.com/coca-cola", 
      "likes": 40680159, 
      "cover": {
        "cover_id": "10150682306963306", 
        "source": "https://fbcdn-sphotos-a.akamaihd.net/hphotos-ak-snc7/s720x720/416803_10150682306963306_40796308305_9337341_812683101_n.jpg", 
        "offset_y": 0
      }, 
      "category": "Food/beverages", 
      "is_published": true, 
      "website": "http://www.coca-cola.com", 
      "username": "coca-cola", 
      "founded": "1886", 
      "description": "Created in 1886 in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage at Jacob's Pharmacy by mixing Coca-Cola syrup with carbonated water. \n\nCoca-Cola was patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States. \n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.", 
      "about": "The Coca-Cola Facebook Page is a collection of your stories showing how people from around the world have helped make Coke into what it is today.", 
      "location": {
        "latitude": -33.816989983333, 
        "longitude": 150.84844081667
      }, 
      "can_post": true, 
      "checkins": 80, 
      "talking_about_count": 297576, 
      "type": "page"
    }
    

    Edit:

    A more clear explanation:

    1. Call the Graph API with the current page id.
    2. If the result is no false, then the redirect_uri would be the link
      returned from the call.
      Otherwise, the redirect_uri should be yourdomain.com/middle-page.php?page_id=XXX
    3. If the user then accepts the application and the redirect_uri is the middle page,
      you then call the Graph API again, but this time, you use the Access Token received
      from Facebook. now you should have the real page url and you can add any additional
      details you need (like ?sk_app=APP_ID)

    According to Facebook own documentation, It’s not clear what happens if the user decided not no accept the application. I think the user will redirect back to the redirect_uri, which then you can check if you have “user_id” in the signed_request, but I’m not 100% sure… Creating a simple app demo and checking 🙂

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

Sidebar

Related Questions

Is there any way to detect when classes have changed during run-time with Hotswap?
I have changed a lot of things in a java code but now I
Hi I have integrated Facebook with asp.net web site through open id But now
I have a website which i integrate with Facebook (via FBML - JavaScript API).
Im trying to develop a new FB App, however it seems they have changed
My app uses Facebook Javascript SDK authorization on client side, and for authorized user
In a facebook iframe page (not tab), I'd like to post data to an
I'm building a Facebook app called Lovers , using a Sinatra app on Heroku
I have a facebook app that I would like to get the total number
I have secured my Grails app using the ACEGI plugin and am using annotations

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.