Monday, April 23, 2012

12 Miles of Terror! and A MiNi Vacation In Vegas


12 Miles of Terror and AMVIV?

A MiNi Vacation In Vegas (AMVIV) is going to have a fun run to the 12 Miles of Terror in 2012.

The location


Hwy 97 runs between Hwy 93 and Hwy 96 in the western part of Arizona, USA. It's actually just 11 miles long, but 12 sounded more fun when we coined the term.


View Larger Map

Some history


I still remember my first run in my 2003 MINI on that road back in 2003, followed by a MiNi fun-run I organized to incredibly fun (and dangerous as some have found) stretch of pure motoring bliss! It's nice to see both of these events/runs that I started are still going strong.


Here's some threads on some other people organizing their own runs on it after I had introduced them to the 12 miles of terror.


Have fun and be safe everyone!!

Tuesday, April 17, 2012

Facebook login, I don't get session when in IE

The symptoms


I've implemented Facebook login on my website using one of the Facebook Graph API SDKs, all browsers seem to work other than Internet Explorer (IE). In IE, the session doesn't seem to work. Why is that?

The problem


Internet Explorer is very twitchy about storing cookies from 3rd parties. This is what is happening with your site and how Facebook logs in. Since the user is on your domain, IE is simply ignoring your session cookie.

The solution


Simply implement P3P headers in your server's responses. This way IE will think your site is alright and then allow this 3rd party cookie to be stored allowing session to be maintained for the SDK to use.

Here's a couple of articles on how to implement a P3P header.

Happy Coding!

Knowing when someone shared your page

Three major players


I usually focus on the three major players in the social media arena. Facebook, Twitter, and Google+. Sorry to all of the other players like LinkedIn, etc.

How to track who shared your page(s)


On each page where you have the Facebook like, Twitter tweetbox, and Google Plus's +1 button, simply subscribe to the callbacks specific to each environment.




Then in your callback functions, just AJAX whatever you want back to your server for it to store. :)



Happy Coding!

Facebook Access Tokens in a nutshell

Three different types of access tokens


APP access tokens

are used to get information that your app is privileged to access from the Facebook Graph API. And in some cases where publish_stream is granted from an app user, you can use it to post to that user's wall, without needing a USER access token.

USER access tokens

are given to your app and they relate to the permissions a specific app user has granted to your application so you app can act on their behalf when interacting with the Facebook Graph API.

PAGE access tokens

are given to page admins so they can act on behalf of the page. To go from a user access token to a page access token, call /me/accounts using the user access token to get a list of pages they admin along with each pages access tokens.

Useful tips


If you have an access token and you want to know more information about it, lint it at Facebook's URL and access token debugger.

For more information on access tokens see: Facebook's authentication documentation.