Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook OAuth redirect_uri to page tab error

Tags:

facebook

oauth

I am following this tutorial http://developers.facebook.com/docs/appsonfacebook/tutorial/ and specifically at this part of code

 $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);

When I enter $canvas_page as

$canvas_page = "http://www.facebook.com/PAGE_NAME/app_APP_ID/"

I get an "Error occured. Try again Later"

If I enter Canvas Page Url instead, it shows the canvas page correctly but I do not want that.

I am sure that it was working last week, so I do not know what is wrong now.

like image 552
Vassilis Barzokas Avatar asked Apr 17 '12 10:04

Vassilis Barzokas


2 Answers

For me the problem was the GET request, somehow it seems facebook asks for the GET parameter, I will show you what I mean:

I had this:

uri = "http://www.facebook.com/pagename/app_appId";

When I changed it to the below it started working:

uri = "http://www.facebook.com/pagename/?sk=app_appId";

Hope this helps someone as it helped me.

like image 105
Immutable Brick Avatar answered Sep 18 '22 22:09

Immutable Brick


According to the docs, this should work - https://developers.facebook.com/docs/authentication/pagetab/

What won't work is redirecting directly from Canvas App -> Auth Dialog -> Page Tab but Page Tab -> Auth Dialog -> Page Tab should work fine with that documentation

like image 27
Igy Avatar answered Sep 19 '22 22:09

Igy