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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:50:52+00:00 2026-06-12T06:50:52+00:00

maybe its a tricky question but anyway: I have a facebook application running on

  • 0

maybe its a tricky question but anyway:

I have a facebook application running on an outside server. Lets say my canvas url is

http://mydomain.com/myapp/

This is integrated into a page, and I can reach the app with an url like

http://facebook.com/mypage/app_123456789

where 123456789 is my Application ID

Users can share certain things on their walls, and that share contains an url back to my app.

So lets say I have a content shared, it has an url like

http://mydomain.com/myapp/content/1

This is where the user goes if he clicks on the wall post.

Now my problem is obviously that I want this url to get redirected back to my facebook PAGE.

It’s easy to redirect everything to

http://facebook.com/mypage/app_123456789

but that takes me to the main page of my application, not to the specific content the user shared.

Is there a way to do this? Like, I can pass a parameter to facebook to tell which page I want to load?

  • 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-06-12T06:50:54+00:00Added an answer on June 12, 2026 at 6:50 am

    Yes you can! Facebook doesn’t pass any old parameters you give when being redirected to an application’s canvas page, but if you manipulate the parameters in a certain way, you’ll gain access to them.

    You’ll have to pass all your parameters in the following format –

    https://apps.facebook.com/yourapp?app_data=key1$value1,key2$value2,...
    

    Once you reach your canvas URL, you can retrieve the data in app_data from within the signed_request. Once you have the contents of the parameter, you should have something like this –

    key1$value1,key2$value2
    

    Now it is just an issue of parsing that string into an array of keys and values. In this specific example, I’ve chosen a dolar character to separate the keys from the values, but as you can see from the code below, you can use whatever you want to separate the parameters and key/value pairs –

    // initialize parameter array
    $getParams = array();
    $signedRequest = $facebook->getSignedRequest();
    // separate each parameter
    $app_data = explode(",",$signedRequest['app_data']);
    foreach ($app_data as $param_key => $param_value) {
      // separate each key/value pair
      list($key,$value) = explode("$",$param_value);
      $getParams[$key] = $value;
    }
    

    At this stage your $getParams array should look something like this

    Array(
      'key1'=>'value1',
      'key2'=>'value2'
    )
    

    Now that you can pass parameters to your application, you’ll be able to decide what content to show according to the data passed to it from the referring URL.

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

Sidebar

Related Questions

I have 2 simple, but maybe tricky questions. Let´s say I have assembler instruction:
Maybe its a very dumb question but I hope you can give me some
My question is a little bit tricky. at least I think. Maybe not, anyway.
Lets say I may (but also may not) have an element with class order
Maybe a little tricky, but I wonder why. In System.Linq.Enumerable.cs of System.Core.dll we have:
Maybe its because I've been coding around two semesters now, but the major stumbling
Im having issues getting this to work, maybe its not even possible? I have
Introspection tells me that django fields have a hidden_widget attribute. Maybe its not this
Maybe I'm wrong but for me its not working, I'm trying to do the
Is it possible to have an enum change its value (from inside itself)? Maybe

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.