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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:24:05+00:00 2026-05-26T06:24:05+00:00

Okay so I’ve setup an app which works fine but there’s one problem when

  • 0

Okay so I’ve setup an app which works fine but there’s one problem when people add tab to their pages they went to page which show “true” it means page is added successful but i want to redirect them to their page or any other link after page tab added successfully.

<?php
session_start();
$facebook=$_SESSION['facebook'];
include("facebook/src/facebook.php");
$facebook=new Facebook(array(
      'appId'  => '197786760292550',
      'secret' => 'e284332964b213066d3b247e1eb4b4a0',
    ));
    $user = $facebook->getUser();
    $access_token = $facebook->getAccessToken();
if ($user) {
      try {
        // Proceed knowing you have a logged in user who's authenticated.
        $user_profile = $facebook->api('/me');
      } catch (FacebookApiException $e) {
        error_log($e);
        $user = null;
      }
    }


//Login or logout url will be needed depending on current user state.

    if ($user) { 

    if(isset($_POST['page']))
    {
    $page=$_POST['page'];
    $explodepage=explode("with",$page);
    $acctoken=$explodepage[1];
    $pgid=$explodepage[0];
    $url="https://graph.facebook.com/".$pgid."/tabs?app_id=197786760292550&access_token=".$acctoken."&method=post";
    ?>
    <script>
window.top.location="<?php echo $url?>";
</script>
    <?php }
    $url="https://graph.facebook.com/".$user."/accounts?access_token=".$access_token;
    $ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: graph.facebook.com'));
$output = curl_exec($ch);
curl_close($ch); 
$input=json_decode($output);
$data=$input->data;
$count=count($data)-1; 
?> <form action="" method="post">
<?php for($x=1; $x<=$count; $x++)
{
    $pdata[$x]=$data[$x];
    $pname[$x]=$pdata[$x]->name;
    $ptoken[$x]=$pdata[$x]->access_token;
    $pid[$x]=$pdata[$x]->id; ?>
    <img src="https://graph.facebook.com/<?php echo $pid[$x]; ?>/picture"/>
    <?php echo $pname[$x]."<input type='radio' name='page' value='".$pid[$x]."with".$ptoken[$x]."' /><br>";
} echo "<input type='submit' name='submit'></form>"; } else {
     $app=197786760292550;
$appsecret="e284332964b213066d3b247e1eb4b4a0";
$url="http://www.facebook.com/dialog/oauth?";
$redirect="http://luutaa.co.in/fb_close/access_token.php";
$scope="manage_pages,publish_stream";
$x=$url."client_id=".$app."&redirect_uri=".$redirect."&scope=".$scope;
?>
<script>
window.top.location = "<?php echo $x?>";
</script>
   <?php }
?>

How can i use redirect to this page which is not mine graph.facebook.com/255826047791900/…***&method=post*

  • 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-26T06:24:06+00:00Added an answer on May 26, 2026 at 6:24 am

    Try this

    echo("<script> top.location.href='" . $x . "'</script>");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, This one is pretty simmilar to my last one, but I don't get
Okay so im working on this php image upload system but for some reason
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent
Okay, so this probably sounds terribly nefarious, but I need such capabilities for my
Okay, I might confuse some people who might be able to answer this question,
Okay, in python one can do this: def foo(monkeys): def bar(monkey): #process and return
okay code: #!/usr/bin/python import wx import sys class XPinst(wx.App): def __init__(self, redirect=False, filename=None): wx.App.__init__(self,
okay, so I'm trying to get a directory of folders and sub folders, but
Okay, so I've got some C code to perform a mathematical operation which could,
Okay i know i have to use the JDBC etc, but im not sure

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.