protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { CheckIfFacebookAppIsSetupCorrectly(); var auth = new CanvasAuthorizer { Permissions = new[] { "user_about_me" } }; if (auth.Authorize()) { ShowFacebookContent(); } } else { AmazonSimpleDB sdb = GetSDB(); // Should I clean out the AWS domain state? if (Page.Request.Params["delaws"] == "1") { //Deleting a domain DeleteDomainRequest deleteDomainAction = new DeleteDomainRequest().WithDomainName("ZigMeRecos"); sdb.DeleteDomain(deleteDomainAction); } // Now read from the AWS domain and populate the dropdown list // First check to see if a domain contain service types exists. if not then create it and populate it // Listing domains /*ListDomainsResponse sdbListDomainsResponse = sdb.ListDomains(new ListDomainsRequest()); if (sdbListDomainsResponse.IsSetListDomainsResult()) { ListDomainsResult listDomainsResult = sdbListDomainsResponse.ListDomainsResult; if (!listDomainsResult.DomainName.Contains("ZigMeServiceTypes")) { } else { String selectExpression = "Select * From ZigMeServiceTypes"; SelectRequest selectRequestAction = new SelectRequest().WithSelectExpression(selectExpression); SelectResponse selectResponse = sdb.Select(selectRequestAction); if (selectResponse.IsSetSelectResult()) { SelectResult selectResult = selectResponse.SelectResult; foreach (Item item in selectResult.Item) { foreach (Amazon.SimpleDB.Model.Attribute attribute in item.Attribute) { if (attribute.IsSetName() && attribute.IsSetValue()) { } } } } } }*/ } }
protected void Page_Load(object sender, EventArgs e) { CheckIfFacebookAppIsSetupCorrectly(); var auth = new CanvasAuthorizer { Permissions = new[] { "user_about_me" } }; if (auth.Authorize()) { ShowFacebookContent(); } }
protected void Page_Load(object sender, EventArgs e) { var auth = new CanvasAuthorizer{Perms = "publish_stream"}; FacebookLayer fb = new FacebookLayer(auth); if (auth.Authorize()) { if (Request.QueryString["action"] != null) { LocationActions(Request.QueryString, fb); } ShowFacebookContent(fb); } }