开发者

Set up multiple Facebook applications in one solution and fan page tap url problem

开发者 https://www.devze.com 2023-03-18 16:16 出处:网络
I have looked and searched for an answer for that question and I found an answer in Nathan Totten blog you can find the answer here:

I have looked and searched for an answer for that question and I found an answer in Nathan Totten blog you can find the answer here:

https://gist.github.com/820881

The problem is I am trying to get the application settings according to the application which the user uses, which comes from the url by seeing your app name or id if you were in fan page.

It works with me within the user profile context by using:

 var CurrentUrl = 开发者_运维百科HttpContext.Current.Request.UrlReferrer;

and i can get the application name but within facebook fan page when using the same way it gives me a strange url :

http://static.ak.facebook.com/platform/page_proxy.php?v=4

However, it is supposed to give me:

http://www.facebook.com/pages/Mypagename/130736200342432?sk=app_myappId

Any help will be great and any new way to get which app id or tap url the user clicked will be even better.


this problem was exist within the user profile before ,and i think that you use the ifacebookapplication current method that will not give you the chance to get any thing about the context it only take you to an infinite loop ,i think that you have to send to Nathan Totten him self may be he has an answer because in the article he mentioned :

private IFacebookApplication GetCurrent()
        {
            var url = HttpContext.Current.Request.Url;

            // Get the settings based on the url or whatever

            var simpleApp = new DefaultFacebookApplication();

            // Set the settings

            return simpleApp;
        }

may be he has a way to get the url within fan page or another way which i am sure it is not exist at least in my mind now .


Thanks ,I found an answer to my case :) now i can get my application id the way is i have to applications i try to decode the sign request with the app secret of each one if the decode result was clear then it is my target app if not then i will try the other one

0

精彩评论

暂无评论...
验证码 换一张
取 消