FacebookSDK-5.0.25.0 for a Iframe Canvas App, after autherization user is redirected to canvas page

强颜欢笑 提交于 2019-12-08 09:37:33

问题


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.

Is there anything i am missing?

Regards Imran


回答1:


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




回答2:


Facebook C# SDK doesnt support tabs.

Only canvas apps are supported.



来源:https://stackoverflow.com/questions/6852065/facebooksdk-5-0-25-0-for-a-iframe-canvas-app-after-autherization-user-is-redire

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!