Facebook C# SDK Sample MVC App About page gets in a loop
When I click on the About tab in the sample MVC app it seems to get into a continual loop calling apps.facebook.com/xxxx/Home/About. I can see from the browser address url that it calls http://localhost:nnnn/facebookredirect.axd/xxxx/Home/About/.....
If I click the Home tab开发者_JS百科 then it all seems to work OK and asks for my Facebook login details.
What am I doing wrong?
Thanks
I didn't have the OATH 2.0 for Canvas enabled.
Which version are you using?
probably issue is that you ask return token
var parameters = new Dictionary<string, object>(); parameters["scope"] = Settings.Current.FacebookScope; parameters["redirect_uri"] = string.IsNullOrEmpty(_url) ? Url : _url; parameters["client_id"] = AppId; string url = oauth.GetLoginUrl(parameters).OriginalString;
then get token
var fb = new FacebookClient();
dynamic result = fb.Get("oauth/access_token", new
{
client_id = AppId,
client_secret = AppSecret,
redirect_uri = Url,
code = FacebookUtils.FacebookData.Code
});
精彩评论