Facebook JS login on Chrome iOS workaround

I was putting together a Facebook JS SDK based login on a site I’m working on – only to find that Chrome on iOS does not support the action.

What was even more surprising was the lack of documentation or support online (with Chrome or Facebook) to help work around the issue.

I saw a few suggestion that had solutions based on using Parse or where others suggested using a backend based login API. I didn’t want to install another framework just to solve this problem, and my objective for the interface was to offer a seamless login process that doesn’t interrupt the user’s current modal based workflow.

To make matters worst, and I am really disappointed in Google for this (which is rare,) popping out windows on Google Chrome iOS makes a null reference to the  “opener” in certain situations. This makes it hard to complete a seamless login between two windows once the FB auth page is verified.

Below is a solution that checks if FB is authed, if not, manually opens an FB auth window that forwards the user to an Opener Handler page. That page forces a refresh of the openers auth tokens and closes the window. Once completed the user is sent back to the original page (with no page refresh) and can now proceed with a validated FB auth.

var ABSOLUTE_URI = "http://yourpage.com/openerhandler.html";
var FB_ID = "123456778";
function openFBLoginDialogManually(){
// Open your auth window containing FB auth page
// with forward URL to your Opened Window handler page (below)
var redirect_uri = "&redirect_uri=" + ABSOLUTE_URI + "fbjscomplete";
var scope = "&scope=public_profile,email,user_friends";
var url = "https://www.facebook.com/dialog/oauth?client_id=" + FB_ID + redirect_uri + scope;
// notice the lack of other param in window.open
// for some reason the opener is set to null
// and the opened window can NOT reference it
// if params are passed. #Chrome iOS Bug
window.open(url);
}
function fbCompleteLogin(){
FB.getLoginStatus(function(response) {
// Calling this with the extra setting "true" forces
// a non-cached request and updates the FB cache.
// Since the auth login elsewhere validated the user
// this update will now asyncronously mark the user as authed
}, true);
}
function requireLogin(callback){
FB.getLoginStatus(function(response) {
if (response.status != "connected"){
showLogin();
}else{
checkAuth(response.authResponse.accessToken, response.authResponse.userID, function(success){
// Check FB tokens against your API to make sure user is valid
});
}
});
}
view raw FB JS Auth hosted with ❤ by GitHub
<html>
<head>
<script type="text/javascript">
function handleAuth(){
// once the window is open
window.opener.fbCompleteLogin();
window.close();
}
</script>
<body onload="handleAuth();">
<p>. . . </p>
</body>
</head>
</html>
view raw Opened Window hosted with ❤ by GitHub

Gyms as a service (GAAS): Finally, better gym options as product services

imgres-1Five years ago I walked into my 24 Hour Fitness Gym and filled out a cancellation form.

“Are you sure that’s all I have to do?”, I asked the front desk rep. “Yup, you’re good to go, good luck with your move!”

Six months later I got a call from a collections agency telling me that I had six months of unpaid membership fees needing collection. Needless to say, it was an awful experience. I am sure many customers end up foregoing upwards of $200 or more in that situation all the time – not me. After hours of phone calls and emails, I was relieved of my “obligation,” but vowed never to use 24 Hour Fitness again – what else could I do than that, right?

In a world when Taxi’s treated you like crap but you still rode in them every day, there wasn’t much you could do with companies like this. Except turn around, take it and walk away.

When I moved back to the area I was a bit hesitant to sign up at any gym, given my experience. I stayed true to my vow and avoided 24-hour Fitness (even though it was cheaper) and signed up at Crunch Gym instead. I had options! Or so I thought.

lsThe sales staff was friendly at Crunch and, as expected, paying for the initiation fee and last month’s dues upfront was a piece of cake. I was instantly a member and assured by the sales staff that, “there won’t be any hassles if you decide to cancel – anytime.” Since then, two years of dues that would have gone into 24-Hour Fitness’ pockets went to Crunch Gym; I had no complaints.

Then moving time came again and I went in to cancel my membership.

“Sorry, you can’t cancel your membership *in* the gym. You have to call this number.” The Gym rep handed me a card. It was a bitter tasting sentence to hear while watching sales staff effortlessly input credit card numbers for the Gym’s newest members.

I called the Crunch cancelation number. “We already charged you this month…” (I come to find this was NOT true) “… and we’ll use your deposit to pay for your last month starting in April. Plus a $2 charge for any differences remaining since we’ve increased membership fees.” It was March 2nd and I was now paying until May 1st.

robber_MGBasically, in one sentence, my “easy cancelation” turned into about $120 of dues over two months toward a gym membership I just canceled. Jackie had the same experience except with a higher monthly membership fee. Crunch Gym robbed $270  from our household. Poof, just like that, Crunch now has the money and we do not. There is nothing the service agent can do about it and he gives me an email address so I can contact a manager to “have it explained to me further.” Sorry, there is no explanation that justifies being fleeced. I asked for a write-up from him explaining why I am being charged for a service I am canceling so I can submit it to the BBB with my complaint. He said he couldn’t do that. He thanks me for my call and hangs up on me. Note: The things they can and cannot do at these Gyms seem heavily skewed in their favor. Weird, huh?

Jackie said let it go, but that very sentence gave me a pit in my stomach. How many Gyms use this tactic to make up the hundreds of millions of dollars in revenue they see each year? They know most customers will let it go, so they keep doing it. I told the story to a few friends, and, not surprisingly, they tell me that it has happened to them with Crunch and other gyms as well. Have gyms formed a Mafia? I guess they have the muscle for it…

The problem that occurs when companies become monopolies (like Comcast) or mafias (like Crunch Gym and 24-hour Fitness) is that customers don’t have much choice in the matter. In this case, either take it or don’t work out.

Uber and Lyft finally gave us the tools to allow us to ditch Taxi cabs (poor customer service standards and all.) And Netflix, Google, and Yahoo are finally causing Comcast to AT LEAST start honoring their “maintenance window” as they try to prove their worth before judgment day. (Gosh, I sure can’t wait for the day Comcast cries about how unfair it is that Google is taking their business.)

Well America, good news. The new world is being filled with products that focus on value, access, customer service and quality. They are starting to aim their slingshots at the Goliaths we know as gyms.

You have options! You can ditch your P.O.S (and/or overly priced) gym and actually get more for less in the process! A membership where your patronage goes toward the local gyms, you’re experiences are of higher quality and customer service is a tent pole. Now that the game has changed, your “gym membership” can get you into specialty studios, access to activities like Kayaking and sports, and a truly “cancel anytime” philosophy that ensures people that have to leave do so as happily as when they joined.

Here are a few:
fitmob_color.fw_1) FitMobfitmob.com – For about the same price as Crunch (and way more friendly cancelation policy and service) this company offers a membership to a multitude of different gyms and activities. For example, you get access to a awesome yoga studio, or (like me) you can head down to the shore and go Paddleboarding for the day. All free with the membership.

Currently Serving: San Francisco, San Jose, San Diego, Portland, Philidelphia, Austin, Dallas, Seattle

imgres2) ClassPassclasspass.com – Founded by Payal Kadakia ClassPath offers access to a variety of studios you can register online for free with your ClassPass membership. What is great about this experience is  you don’t get a class thrown together by amateurs working for a corporate gym. Instead, you get to go to the best studios in town that specialize in an activity for whatever you want to do. ClassPath is on to something having just raised $14M in funding and growing exponential into more and more cities month after month.

Currently Serving: NEW YORK LOS ANGELES/ORANGE COUNTY SAN FRANCISCO CHICAGO MIAMI BOSTON WASHINGTON, DC SEATTLE ATLANTA AUSTIN CHARLOTTE COLUMBUS DALLAS/FORT WORTH DENVER HOUSTON MINNEAPOLIS/ST. PAUL PHILADELPHIA PHOENIX PORTLAND SAN DIEGO LAS VEGAS RALEIGH BALTIMORE TAMPA ST. LOUIS ORLANDO NASHVILLE KANSAS CITY LONDON TORONTO VANCOUVER

Sorry Crunch, you had your day and just like the Taxi mafia – your time is limited.

More comments available on the public FB post here: https://m.facebook.com/story.php?story_fbid=10152976618217107&id=704372106

**UPDATES***

March 3rd – Still no charges (or pending charges) on my credit card bill from Crunch. The support rep told me it was already charged and there was nothing he could do about it as a result. Nice tactic – untrue after 2 full business days.

(March 2nd) Crunch asked me to contact a store manager – this is what I sent:
Screen Shot 2015-03-03 at 5.42.53 PM

 

Update March 4th: If you’ve had a similar experience you can contact Jasmine <Jasmine.Vega@crunch.com>. Below is her email and my reply.

Screen Shot 2015-03-04 at 1.22.34 PM

March 4th

Screen Shot 2015-03-04 at 3.33.42 PM

Built-in Dictation on Yosemite

What I dictated – as is and untouched:

It’s been a while since I had tried using dictation mostly because it’s never worked before I don’t know how long maps habitation on it but I figured I’d give it a shot again this blog is written completely has dictation with no edits made to see how good it aside for my poor dictation skills hopefully the words being written are exactly as I intended blow is [the dictation ended automaically maybe becasue my pause or just to many words – starting over] A link showing you how you can set up dictation on your computer. I just noticed that all the dictation coming before this punctuation so I must have to say the punctuation out loud, which is expected.

http://support.apple.com/en-us/HT5449

What I actually said – uncorrected:

It’s been a while since I have tried using dictation. Mostly because it’s never worked well before. I don’t know how long mac has had it, but I figured I’d give it a shot again. This blog is written completely as a dictation with no edits made to see how good it is. Aside for my poor dictation skills, hopefully, the words being written are exactly as I intended. Below is […] A link showing you how you can set up dictation on your computer. I just noticed that all the dictation coming before this had no punctuation – so, I must have to say the punctuation out loud, which is expected.

http://support.apple.com/en-us/HT5449

Screen Shot 2015-02-23 at 11.28.10 PM

To set up dictation go to your preferences and choose “Dictation and speech.”

HT5449-yosemite-system_preference-dictation-001-en

 

Turn dictation on and you’re all set. Press Fn key twice to start.

Annnnnnnd end scene…

Overall it’s not too shabby of an implementation considering it used to cost hundreds of dollars to get dictation software on your computer. Also, it helps that the dictation bar has always been set fairly low. To be fair, trying to make up something while dictating is a bit unnatural – so I can see why the feature would stumble through a sentence; I sure did. A nice feature is that dictation works in any website or app on your mac – all you have to do is press the function key twice and start talking 🙂

You can also go the extra mile and set up text commands. This feature is not new, and I have never found myself able to speak my commands more quickly than I could keyboard them – so I will leave that decision up to you. You can read more about voice commands herehttp://www.macworld.com/article/2834532/ok-mac-using-automators-dictation-commands-new-in-yosemite.html

Wolfram Alpha: Product Spotlight

Wolfram-Alpha-iconWolfram Alpha calls itself a “computational knowledge engine” and was spun out of “Mathematica,” a mathematically intensive formula and graphing calculator on steroids.

Although amazingly powerful, Wolfram Alpha is not widely known, though you may already be using it. Its one of the data engines behind Siri – and one of the few Siri systems you can actually count on. It responds on Siri’s behalf for computationally based queries. For example, when you ask Siri “How many inches in 10 meters” she replies with:

IMG_7595

Notice the logo beneath the answer.

You can access Wolfram Alpha directly on the web and get some surprisingly robust answers from it. Just for kicks, while showing Wolfram Alpha to a friend (completely unrehearsed), I asked it, “How many cars are on the road?” ( Purposefully leaving it a bit vague.) Surprisingly, this is what it responded with:

Screen Shot 2015-02-22 at 10.00.18 PM

It helps that Wolfram Alpha is scoped. It focuses on statistical and computational questions. Therefore, it doesn’t search the web for trends and rankings since it’s primarily driven by data and math. So, to get the most out of it I suggest focusing your questions on ones that possess those qualities. It can be, for example, a good place to gather preliminary data for your research. Like this one, “number of families in the united states with an average income above $100,000 per year.

Screen Shot 2015-02-22 at 10.00.33 PM

To be honest, it’s been years since I last played with it; it’s kind of one of those products that its usefulness ebbs and flows. Recently, however, while researching a “social product” idea, I stumbled upon this nifty feature advertising a Facebook Report from Wolfram and decided to give it a go.

Wolfram Alphas Facebook Report

Not only was the data of the report interesting but the speed at which it gathered, computed and graphed it all was a bit stunning. It’s able to give you just about everything about you on Facebook.

Screen Shot 2015-02-22 at 9.57.21 PM

You can view charts of your post history over time, as a ratio between posting images vs. text, most active times of day by media types or a word-cloud of your most often used vocabulary. You can find out what post garnered you the most likes or comments, who’s commented on your posts the most and how often you use the FB app.

Screen Shot 2015-02-22 at 9.57.43 PM

This little graph shows me the ratio of female friends I have to male ones and what their relationships status’ are – broken down into a pie chart. You can see the average age of my friends and where in the world my friends live.

Screen Shot 2015-02-22 at 9.58.11 PM

This graph I don’t really even understand, but it looks hella informative!

Screen Shot 2015-02-22 at 9.58.37 PM

All in all Wolfram Alpha is a fun product to play with and may even help you get some of your research started and difficult questions answered quickly.

Here are some other fun questions to ask it:

Facebook V. Twitter

How far is Saturn (Remember, distances are not static)

First cousins once removed

35,000 Words in Finish

More examples

Heroku now deployed through Github

heroku-logoI’m a big fan of Heroku setup for pet projects. With it I am able to quickly deploy a project without having to develop on some proprietary  framework or prep a server to host a website. I especially love how easy it is to deploy directly from my local machine through a git push to master, and my ability to run and configure the system through a dashboard or command line toolbelt.

Until now however, I needed to keep two repos to manage my source code. One in Github for sharing, viewing, and tracking; and one in Heroku for deploying. Last week Heroku released a new feature that allows you to connect your Heroku account to Github: https://blog.heroku.com/archives/2015/2/6/heroku_github_integration

You can use this new feature to select which branch Heroku should use to trigger auto-deployments, as well as run pre-checks against your C.I. system tests. In short, I likey 🙂

wanderworld_·_Github___Heroku

3 reasons why I’m bullish on extensions, plus a better scheduling app.

simplicity-b2b-content-marketingScheduling time to meet with someone is one of those things that’s just hard enough to be annoying, but probably not complex enough to need a whole new tool to simplify it. It’s one of those problems that makes for a perfect example of how-to, or how-not-to, create a great product.

Often in the product world we find a problem we want to solve and end up creating a far more complex system to solve it; one in which the user has to change usage patterns or require ramp up time. As a result, minor problems and annoyances (like scheduling meetings) don’t get dramatic improvements because the cost v. benefit v. ramp-up never quite get to a point in which the user is willing to change their habits to gain the benefits from a new tool. “I’ll just send an email” or “I’ll just use a spreadsheet” can kill the potential for “robust” products. And rightly so, email and spreadsheets are comfortable, versatile and already understood between groups.

That’s why I have been bullish on extensions, especially the Google Chrome ones.

The good ones are able to find a balance between:

  • A lack of ramp-up time.
  • An integration into the tools and workflows I already use.
  • No requirement for other parties to have the platform in order to use it.

189171-bf657de80640275b84d3931444d6fafe-medium_jpgAn example of a great extension I was introduced to recently is Assistant.to. Assistant.to is a Chrome extension that links to your Google Calendar and extends your Google Email composer so you can easily drop-in potential appointment/meeting times as text and links in your email. There was no setup, all the interaction happens within the GMail composer, and the form factor works in a way that needs no additional explanation or signups for the receiver.

It is a must have tool for sure! Here are some screenshots of the workflow:

 

Checking_in____-_sean_shadmand_gmail_com_-_Gmail
Extension overlay

 

Checking_in____-_sean_shadmand_gmail_com_-_Gmail 2
Expanded overlay

 

Checking_in____-_sean_shadmand_gmail_com_-_Gmail 3
Select availability

 

Checking_in____-_sean_shadmand_gmail_com_-_Gmail 4
Available times copy and pasted

 

Assistant_to_-_Your_Personal_Scheduling_Assistant
Meeting confirmed

As a note, another great extensions I’ve been using lately is the one Grammerly.com that allows great inline writting corrections and tools.

Product Review: Duolingo a free language learning app

Duolingo_logoBased out of Pittsburg Pennsylvania this app was created by the founder of reCaptcha and has taken a truly new approach to learning foreign languages.  For one,  as compared to other tools like Rosetta Stone that costs its customers hundreds of dollars per language, Duolingo is free to use!

Beyond just being free, the app has done an excellent job in gamifying the language learning process with daily challenges, points, and levels. One simple feature that caught my eye was they option to “test out” of individual levels avoiding the need to review an entire section you may know. I’ve been using it for the last three days and have thoroughly enjoyed it.

Here are some screenshots of gameplay:

screenshots_duolingo

There is a second mission to Duolingo’s story that makes the app even more unique. In the backend, while you are using the app to learn a language, their algorithms are simultaneously using your answers to help improve translations for websites and other documents!

If you are interested in picking up another language Duolingo leaves you with few excuses not to start today. Adios y gracias!

 

Product Review: A great new way to write better emails, blogs and more

1901937_900007186684939_6521091158949317344_nIt’s no secret, out of all the talents I may have, the acuity for perfect grammar is not one of them. As a child, my poor spelling was covered up only by my even worse handwriting. As hard as I try, remembering to use “then” instead of “than” seems to find a way to slip by me!

Spellcheck and other technology gave me the confidence I needed to write more often, and a 140 character limit on Twitter helps force you to find more value in fewer words. However, those technologies are limited in scope and miss simple word confusion like “then” and “than” that slip by now and again.

If there are others out there like me, and it sounds like there are THEN I need you to check out this great new tool! It will help you push out more consistently proofed and well-manicured copies of writing THAN you’ve ever had before!

The tool is called Grammerly.com. I’ve only been using it for less than 24 hours, but I’m already impressed. The basic plan is free, and it comes with this neat little Chrome extension that super-charges your browser-based text. Here are a few of examples:

 extension

Unfortunately, it still missed some “then” and “than” mix-ups, as well as a few situations where two words should be one (e.g. proofreading). These are mistakes that only a person would catch. That’s where the fun part comes in.

They have this neat feature called “Professional Proofreading,” and for $0.02 per word, you can request a real live human to read over your material. Below is my experience and what provoked me to write up this blog!

 

professional
Request proofreader

ready
“proof complete” notification and email

corrected
download red-lined copy in only a few minutes.

 


Of course, you wouldn’t use a professional proofreader all the time, but for important emails to the public or to double-check each blog post, it may be money, and time, well spent. Enjoy!

 

 

​I invested 50/50 in Betterment and Wealthfront and this is what happened

022312_etfs_front_leadI’ve been hearing a lot of debate between financial “experts” and casual investors around the pros and cons of ETFs and managed VS. unmanaged accounts.  As I mentioned in this posts about “when experts disagree do your own thing” I figured the only way to get a non-bias answer is to spread my investments in them all and see what happens in 30 years. Sure, anything could happen but if nothing else I’ll learn a lot.

​I recently invested 50/50 in Betterment and Wealthfront for my unmanaged ETF test (based on my good friends Daniel Odio’s post) to see how they perform overtime and to compare the results to my fully managed investment account. This won’t be as much of an investigation and extension of any debate but rather a summary of my personal experience with products and services across the board. For this post I will focus on what my initial experience has been between Betterment and Wealthfront so far.

I thought it would take a while to start spooling up some experiences but in the first inning (as a new depositor into both Betterment and Wealthfront accounts. Same amounts, risk settings etc  ) Betterment is definitely ahead, here’s why: the stock market took a plunge these last few weeks and I wanted to  invest in the possible fire sale. Now whether or not that tactic is sound is another story. What matters to me personally is that I was able to invest directly from my bank account into Betterment within 24 hours seamlessly. In addition the site and my app showed me the money was deployed and begun to display gains/loses immediately. Wealthfront took over a week to transfer and although the money shows as being pulled from my bank account there is still no sign of it in the Wealth front app or dashboard. The app has no insight into anything and just shows a list of recently posted blogs by the company.

That lag has already cost me 3% and If the market continues to recover it who knows how much that will mean long term. Of course if the market continues to dip the lag in wealth front will be a lucky break but I don’t use a service hoping it will work poorly so that sways in the market will work in my favor. 

Regarding the apps, Betterment is the winner so far as well. Welathfront may have no more information and graphs once the funds display correctly, but who knows at this point as a new investor – current there is just a 0 on the screen that is not clickable. Betterment lists my pending transaction, as well as current deployed capital broken down by earnings to date. And it’s the same story for the website. From a user experience point of view Welathfront just shows me the same form it showed me when I initiated the bank transfer – no updates or info is accessible for this account with any useful information.

The lack of “warm and fuzzy” information I am getting as a new customer leaves me concerned for what my future experiences will be like with Wealthfront.  It’s far to early to count them out since, if after the funds are deployed, I may get great graphs, information, tax benefits, and more but as a new user the cold hard fact it I am more satisfied with the way Betterment is taking care of me than Wealthfront.

In closing, at this stage of the experiment I:

a) hope that the post-funding user experience at Wealthfront is way better than the ramp up experience.

b) suggest that WealthFront improve upon the points listed above.

I know there may be many features and options that I am missing that both can do but in the initial experience where features are limited as is my expertise with using the systems I can only comment on what I know as a new customer and that is what I have done. Honestly, I win if both do well so I mean it when I say: best of luck to the challengers!