Niraj Bhatt – Architect's Blog

Ruminations on .NET, Architecture & Design

Your Deals, Your Way – Leveraging Windows Azure for Facebook Applications

In this blog post I will describe how you can use the demo version of Your Deals, Your Way (YDYW). YDYW is a web application hosted on Windows Azure and integrates with Facebook. You can access the application at – Below is a quick walkthrough of major workflows of the application (subscribing a deal and posting a deal) and a quick discussion on preventing your Facebook account from being spammed. Let;s get started:

As a first step you need login with your Facebook account and grant it the required permissions.

Now you will be moved to ‘Pick Your Deals!!!’ Page where you can pick deals you wish for

Once you pick up a deal you see it populated in your wishful deals.

Now whenever these deals would be available YDYW would leave a message on your Facebook wall, helping your friends to know about them and help you connect with others in case a bulk order discount is offered by vendor.

For the demo version posting a deal is open to anyone. One needs to browse the application page – Login with account for which you want to post the deal

Once logged into the application, you can see the subscribers’ graph allowing the account owner to see how many people are subscribed for his products, at what discounts and identify what is the viral reach of total subscribers for each product.

Deals can be placed then for a given product, given discount till a given date and once placed they too will be available inside ‘Deals already placed’ section

Whenever deal is placed it would notify all the subscribes in step (a) by leaving a message on their wall as below

As posting deals is open to general public at times you might find lot more posts on your walls. They way to turn of them is either deleting that post or unsubscribing to all the deals or remove access to the application. These are described below.

1) Removing a post on your wall is simple – just remove it by clicking close button

2) Unsubscribing to deals too is quite easy just delete them. Application notifies you only when you are subscribed to a deal, removing these deals would ensure that you receive any unwanted messages

3) Finally you can remove the access to ‘Your Deals, Your Way’, a route which I hope you won’t take . Do the same you need to go your account privacy settings as shown below

Browse to Apps and Websites

And finally remove the ‘Your Deals, Your Way’

That’s it!!! Hope you had a good time visiting YDYW. Thanks for your time in testing out the alpha version and I look forward to your feedback 🙂 .


2 responses to “Your Deals, Your Way – Leveraging Windows Azure for Facebook Applications

  1. rainboost September 8, 2011 at 10:55 pm

    Hello, Niraj!
    I couldn’t advance in the app due to an error. Right after login i’ve got this:

    [SqlException (0x80131904): String or binary data would be truncated.
    The statement has been terminated.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +404
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning() +412
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1363
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +6312253
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +6313986
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +538
    System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +689
    System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +327
    Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DbCommand command) +475
    Utilities.UnitOfWork.ExecuteNonQuery(DbCommand dbCommand) in C:\AzureSamples\YourDealsYourWay\Utilities\UnitOfWork.cs:48
    Repositories.FBUserRepository.CreateFBUser(FBUser fbUser) in C:\AzureSamples\YourDealsYourWay\Repositories\FBUserRepository.cs:54
    CSASPNETWebsite.About.Page_Load(Object sender, EventArgs e) in C:\AzureSamples\YourDealsYourWay\CSASPNETWebsite\Default.aspx.cs:72
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
    System.Web.UI.Control.LoadRecursive() +71
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048

    Sorry for long comment i thought it could help you to fix the problem. Regards!

  2. nirajrules September 10, 2011 at 2:36 pm

    Sergei, thanks a lot!!! Can you please check it out again and let me know your experience?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: