Wednesday, February 15, 2012

FB has changed a way to add FB app to FB page

I was working on fb app and was not able to find a way to add app on fan page. Earlier it used to be in app's profile page but now they've discontinued app profile page so only way to add new app to a page is  by using the below link.

https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL

where YOUR_APP_ID is your app's ID and for YOUR_URL I use canvas page URL

You can find more detail below(see Adding an App to a Page section):
https://developers.facebook.com/docs/appsonfacebook/pagetabs/

Tuesday, November 8, 2011

Setting up session in Facebook iframe app

When I tried to use session in Facebook canvas iframe application, in IE browser I was having issue with session not being set up but in Chrome and FF it works. So to make it work in IE I added this below code (for ColdFusion) and it worked in IE too:

<cfheader name="P3P" value="CP='IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT'" />

Ref:
http://stackoverflow.com/questions/3871199/facebook-iframe-not-working-in-ie-session-login-issue

Sunday, October 23, 2011

ASP.NET MVC Pipeline

Life cycle of a request in ASP.NET MVC.


Sunday, October 16, 2011

SQL to get unique entry and the date it was first entered

Let's say you have this table:

Email          EnteredDate
abc@abc.com    11/1/2011
xyz@zyx.com    11/1/2011
abc@abc.com    11/2/2011

and you want to get list of unique emails and the date when it was first entered. Then this query:

SELECT email, min(EnteredDate) as FirstEntered FROM entries
GROUP BY email

will give you this result displaying unique email with the date it was first entered:

Email          FirstEntered
abc@abc.com    11/1/2011
xyz@zyx.com    11/1/2011

If you know any better solution then please share it with me.

Tuesday, October 11, 2011

Tool to debug Facebook's Open Graph protocol


Great tool to debug Facebook's Open Graph protocol https://developers.facebook.com/tools/debug

This tool displays all Open Graph Object properties which helps us to debug the properties we have set on our pages. This way we will be sure whether we have set the properties correctly or not.

Monday, October 10, 2011

Fix for facebook iframe scrollbar issue

Sometimes FB.Canvas.setAutoResize or FB.Canvas.setSize fails to remove the scrollbar from applications. To fix it you can put <body style="overflow:hidden"> in body tag.

Saturday, October 8, 2011