This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CanvasUrlBuilder urlBuilder = new CanvasUrlBuilder(httpContext.Request, canvasSettings); | |
var url = urlBuilder.GetLoginUrl(this.FacebookApp, Perms, ReturnUrlPath, CancelUrlPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void Application_Start() | |
{ | |
FacebookContext.SetApplication(new RequestScopedFacebookApplication()); | |
} | |
private class RequestScopedFacebookApplication : IFacebookApplication | |
{ | |
private IFacebookApplication Current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<system.webServer> | |
<httpProtocol> | |
<customHeaders> | |
<clear /> | |
<add name="X-UA-Compatible" value="IE=9; chrome=1" /> | |
</customHeaders> | |
</httpProtocol> | |
</system.webServer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MvcApplication : System.Web.HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
// Register your multi-tenant application on app startup | |
FacebookApplication.SetApplication(new MultiTenantFacebookApplication()); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc { | |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.Runtime.CompilerServices; | |
using System.Text; | |
using System.Web; | |
using System.Web.WebPages.Html; | |
using Microsoft.Internal.Web.Utils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc { | |
using System.Runtime.CompilerServices; | |
[TypeForwardedFrom("System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")] | |
public enum TagRenderMode { | |
Normal, | |
StartTag, | |
EndTag, | |
SelfClosing | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Export] | |
[PartCreationPolicy(CreationPolicy.NonShared)] | |
public class AccountController : Controller | |
{ | |
const string appId = "188070564565375"; | |
const string appSecret = "<app_secret>"; | |
// ************************************** | |
// URL: /Account/LogOn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CachedLocationService : LocationService | |
{ | |
private static List<StoreLocation> locations; | |
private static DateTime expireTime = DateTime.UtcNow; | |
private static object syncLock = new object(); | |
public CachedLocationService(DataModelContainer dataModelContainer) | |
: base(dataModelContainer) { } | |
public override StoreLocation GetByStoreNumber(int storeNumber) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dynamic data = CanvasContext.Current.SignedRequest.Data | |
if (data.page.liked) { | |
// has liked | |
} else { | |
// Not liked | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FacebookLogger { | |
private static readonly FacebookLogger Instance = new FacebookLogger(); | |
/// <summary> | |
/// Gets the current Facebook logger. | |
/// </summary> | |
public static IFacebookLogger Current | |
{ | |
get |
OlderNewer