简体   繁体   中英

redirect the user to dynamic page after they allowed the facebook app?

I have images on my website that the user needs to allow the Facebook application in order to view them. So when the user click on the image (thumbnail) it should talk him to the image page and check if he allowed the application. So how do I redirect the user to the user to that specific image page after allowing the Facebook application. something like this:

header('Location: image_page.php');

I tried this it is taking him to the allow page on facebook again. I tried to change the -1 but I got the same problem:

header("location:javascript://history.go(-1)");

最简单的方法是将引用页面的URL填充为您在调用Facebook身份验证对话框时指定的redirect_uri

you should specific the image page when redirect the user to facebook to allow your application.

here is the url to redirect user to Facebook auth:

https://www.facebook.com/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=YOUR_CANVAS_PAGE

you should replace YOUR_CANVAS_PAGE with your image page url

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM