FacebookSDK-5.0.25.0一个IFRAME中画布应用程序,之后autherization用户被重定向到画布页面 [英] FacebookSDK-5.0.25.0 for a Iframe Canvas App, after autherization user is redirected to canvas page

查看:308
本文介绍了FacebookSDK-5.0.25.0一个IFRAME中画布应用程序,之后autherization用户被重定向到画布页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用C#的Facebook SDK工作的Web应用程序使用.NET 3.5。加载页IFRAME标签的一些信息,并输入按钮内,按钮我与一些权限做auth.Authorize()的点击,FB许可窗口打开罚款,但一次就允许用户按钮,点击它被重定向到应用程序的画布页面而不是页面选项卡。

I am working on web application with .net 3.5 using C# facebook SDK. Loading page inside Page Tab iframe with some information, and input button, on click of button i am doing auth.Authorize() with some permissions, FB Permission window opens fine, but once user click on allow button it is redirecting to application canvas page instead of Page tab.

有什么我失踪?

问候
伊姆兰

推荐答案

答是设置auth.ReturnUrlPath将在Facebook页面将用户返回到选定的标签。如果您的应用程序被添加到多个页面,那么你可以找到来自签名的请求,并设置正确的ReturnUrlPath当前的pageid,并附加?SK = app_YOUR_APP_ID作为查询字符串来ReturnUrlPath所以当前的标签将被选中。您的返回路径将类似于东西: HTTP://www.facebook。 COM / profile.php ID = YOUR_PAGE_ID&放大器; SK = app_YOUR_APP_ID (请确保您同时处理HTTP和HTTPS)

Answer is to set auth.ReturnUrlPath which will bring user back to selected tab in facebook page. If your application is being added to multiple pages, then you can find out current pageid from "signed request" and set correct ReturnUrlPath, and attach ?sk=app_YOUR_APP_ID as querystring to ReturnUrlPath so current tab will be selected. your return path will look something similar to : http://www.facebook.com/profile.php?id=YOUR_PAGE_ID&sk=app_YOUR_APP_ID (make sure you handle both http and https)

这为我工作,希望能有人工作过。

This worked for me, hopefully will work for someone too.

-Ims

这篇关于FacebookSDK-5.0.25.0一个IFRAME中画布应用程序,之后autherization用户被重定向到画布页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆