Friday, September 9, 2011

top.location.href='" . $auth_url . "' No longer Works.

The following PHP example demonstrates how to access the signed_request parameter and prompt the user to authorize your app:

$app_id = "YOUR_APP_ID";

$canvas_page = "YOUR_CANVAS_PAGE_URL";

$auth_url = "http://www.facebook.com/dialog/oauth?client_id="

. $app_id . "&redirect_uri=" . urlencode($canvas_page);

$signed_request = $_REQUEST["signed_request"];

list($encoded_sig, $payload) = explode('.', $signed_request, 2);

$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);

if (empty($data["user_id"])) {

echo("");

} else {

echo ("Welcome User: " . $data["user_id"]);

}

?>

The line in red which says:

echo("");

redirect your app to the authentication screen. This however no longer works. Replace the line with:


            echo ""; 

11 comments:

  1. voled    voles    volta    volte    volti  
     volts    volva    vomer. vapidly  vapored  vaporer  vapours  vapoury  vaquero
     variant  variate. argles   argols   argons   argosy
      argots   argued   arguer   argues.

    Here is my blog post ... eye floaters

    ReplyDelete
  2. I am no longer certain the place you are getting your info, but great topic.
    I needs to spend some time learning much more or figuring out more.
    Thanks for wonderful information I used to be searching for this information
    for my mission.

    Feel free to visit my website - Lexmark Printer Ink (tumblr.com)

    ReplyDelete
  3. fantastic issues altogether, you just gained a new reader.
    What would you recommend about your post that you just made some
    days ago? Any sure?

    Here is my web-site: Ultimate Herpes Protocol Reviews

    ReplyDelete
  4. Some Laptop Pads incorporate fans in them to maximize
    the amount cooling to the bottom of the notebook computer.
    "Honestly, we got some fortunate bounces with the 5-on-3, and we took care of it," St.
    It's furthermore worth noting the dual front-facing speakers, although here was thumbs down luck to test audio quality.



    my web blog: asus memo pad review

    ReplyDelete
  5. Yеs! Finally ѕomething about thгombosed internal hemorrhoids
    cures.

    Also visit my web-site: thrombosed hemorrhoids are ruining my life

    ReplyDelete
  6. Well, the laws' idea continues to be to maximize independence.
    Your lawyer may declare that someone has entrapped you and was fooled to make this crime.
    We were currently pushed to go our horses.

    Also visit my page - Evasi0n download (deadopsarcade.com)

    ReplyDelete
  7. Thanks fߋr a marvelouѕ posting! I actually enjoyed reading
    it, you may be ɑ great аuthor. I will ensure that I booƙmark your bloǥ and
    will often come back in tҺe future. I want too encourge yoս
    to dеfіnitely continue your great posts, have a nice evening!


    Feel free to surf tο my weeb site :: buy twitter Followers Singapore

    ReplyDelete
  8. I simply couldn't leave your site prior to suggesting that I really
    loved the standard info an individual supply in your
    visitors? Is going to be back continuously to check up on new posts

    Here is my blog post :: natural slimming tablets

    ReplyDelete
  9. Manufactured by FutureTap Gmbh, Where You Should is your ultimate navigation solution. Other camera is on the
    entrance and it's for voice calling. When the corporation has confidence on their goods this structure is achievable.



    Here is my web site :: cydia ios 7 tweaks

    ReplyDelete
  10. You should be a part of a contest for one of the highest
    quality sites on the net. I'm going to highly recommend this blog!


    Here is my web-site ... affiliate marketing  philippines

    ReplyDelete
  11. I know this if off topic but I'm looking
    into starting my own blog and was wondering what all is needed to get set up?
    I'm assuming having a blog like yours would cost a pretty penny?
    I'm not very internet savvy so I'm not 100% sure.
    Any suggestions or advice would be greatly appreciated.
    Thanks

    Here is my site; home renovations ideas, ,

    ReplyDelete

Did this help you?
How can we help you further?