Hello!

My Name is Jodi. I live and work in Northern VA. I like to build web apps.

What sites see when you login with Facebook

I’ve been working on a lot of web apps with social networking authentications lately and it has been interesting to see what developers can see when you login via Facebook (as well as other social networks). Below is an example of what a site has access to when you login via Facebook. The below example is a request for “basic information” and “email”. When you login, Facebook will tell you what the site is requesting access for. You can think of the array below as the minimum amount of data you normally give them access to. In reality, most apps request access to more data than this including your wall posts, contacts, likes, etc.

For my profile, requesting access to “read_feed” resulted in an array 2,054 lines of data containing gps coordinates of all my check-ins, photos I’ve been tagged in, and everything someone has said on my wall in the last 6 months as well as the full name and facebook ids of my friends who posted on my wall.

To give you a visual perspective, here is an extremely zoomed out screenshot of the data returned with just feed permissions.

Below is an array of the “basic information” you give sites when you login with your facebook account:

Array
(
    [FB] => Array
        (
            [Me] => Array
                (
                    [id] => 15601718
                    [name] => Jodi Wilkinson
                    [first_name] => Jodi
                    [last_name] => Wilkinson
                    [link] => http://www.facebook.com/jowilki
                    [username] => jowilki
                    [hometown] => Array
                        (
                            [id] => 123456789101112
                            [name] => Roanoke, Virginia
                        )

                    [location] => Array
                        (
                            [id] => 123456789101112
                            [name] => Reston, Virginia
                        )

                    [work] => Array
                        (
                            [0] => Array
                                (
                                    [employer] => Array
                                        (
                                            [id] => 123456789101112
                                            [name] => KZO Innovations
                                        )

                                    [location] => Array
                                        (
                                            [id] => 123456789101112
                                            [name] => Reston, Virginia
                                        )

                                    [position] => Array
                                        (
                                            [id] => 123456789101112
                                            [name] => Co-founder, VP of Products
                                        )

                                    [start_date] => 2007-03
                                )

                        )

                    [education] => Array
                        (
                            [0] => Array
                                (
                                    [school] => Array
                                        (
                                            [id] => 123456789101112
                                            [name] => Degrassi High
                                        )

                                    [year] => Array
                                        (
                                            [id] => 123456789101112
                                            [name] => 2002
                                        )

                                    [type] => High School
                                )

                            [1] => Array
                                (
                                    [school] => Array
                                        (
                                            [id] => 123456789
                                            [name] => Example University
                                        )

                                    [year] => Array
                                        (
                                            [id] => 1234567891123145
                                            [name] => 2006
                                        )

                                    [concentration] => Array
                                        (
                                            [0] => Array
                                                (
                                                    [id] => 1234567891123145
                                                    [name] => Information Technology
                                                )

                                        )

                                    [type] => College
                                )

                        )

                    [gender] => female
                    [email] => email@example.com
                    [timezone] => -4
                    [locale] => en_US
                    [verified] => 1
                    [updated_time] => 2012-04-18T00:14:05+0000
                )

        )

See Graph API Reference and click on each link to see more examples of data that is available. I’m not one of those super privacy freaks, I just think everyone should be informed when they allow other websites access to their Facebook data. I think it becomes more of a reality when you see it in this format. Logging in via Twitter, for example, is generally a better option because it does not provide websites or developers access to your email address. It also has less personal information for the most part. Twitter discloses your “display name” which can be a pseudonym and doesn’t require your real first name or last name.

Running Shells as Cronjobs with CakePHP on Ubuntu

I found it a little tricky to get my CakePHP shell to run as a cronjob on my Ubuntu server, so I thought I’d do a little write up on how I ended up doing it. First off, I’m using Cakephp 2.0 and Ubuntu 10.04 LTS. I’m not a linux expert, which is probably why I had issues figuring it out in the first place.

The first step is to have a shell script you want to run. For the following example, I have a shell called HelloShell.php located in /var/www/example.com/public_html/app/Console/Command/ . See Cake’s Console and Shells guide for more details on writing shell scripts.

I use the cake console pretty often for the bake functionality, so I always add a path to it so I can access from any directory.

To do this, I edited .profile in my home directory and added this line at the bottom to the location of my cake console:

export PATH=/var/www/example.com/public_html/lib/Cake/Console:$PATH

I believe you have to logout and back in for it to take effect.

Now type: cake -app /var/www/example.com/public_html/app hello

If your path is set properly, you should see the output of your HelloShell.php script. Now we’re good to go to setup the cronjob.

Type crontab -e to open up the editor.

Here are the settings I used to run my cronjob every 30 minutes:

*/30 * * * * /var/www/example.com/public_html/lib/Cake/Console/cake -app “/var/www/example.com/public_html/app” hello

You can also output to a log file with various levels of verbosity:

*/30 * * * * /var/www/example.com/public_html/lib/Cake/Console/cake -app “/var/www/example.com/public_html/app” hello –quiet >> /home/myusername/hello_cron.log

Hope this helps someone!

Pinterest Plugin For WordPress

Wordpress Pinterest Plugin

I just developed a new plugin for WordPress that pulls the latest images, captions, and links from your latest Pinterest activity and shows it off on the sidebar. There are several customizations you can make to it to match the look and flow of your site.

You can read more about it and download the plugin for free from the WordPress plugin directory.

There will be a lot more great features to come once Pinterest opens their API to developers.

Feel free to post any questions in the comments or ask me on twitter.

Easiest way to make a form in CakePHP

The easiest way to make the HTML for a simple form is to use CakePHP’s built-in FormHelper. Once you get your model and table set up with the fields you need, a little shortcut is to use the inputs() function so that you don’t have to type out each individual field input:

<?php
echo $this->Form->create('Post');
echo $this->Form->inputs();
echo $this->Form->end('Submit');
?>

This method puts Cake’s automagic form elements to work and will save some time and shave off a couple lines of code if your form isn’t too complicated.

Installing an aftermarket stereo in a Volkswagen Beetle

I recently installed a new aftermarket stereo in my 1999 Volkswagen Beetle. I was kind of forced into getting a new radio because I took my car in to a shop to diagnose a battery drain and they ended up cracking my factory radio when they pulled it out.

I have no real experience working with cars, and the install definitely took a lot longer than expected, but I think this is a task that most people can handle. My install was complicated by the fact that the shop that diagnosed my battery drain also removed the fuse to the radio (fuse 42, fyi) and didn’t tell me about it.

I ordered most of the parts I needed off of Amazon.

The stereo I bought was the Sony Xplod CDXGT55UIW. It has both USB connectivity with iPhone support and an AUX port for connecting anything else. It definitely beats the tape deck in my old radio.

Here’s the full list of items I needed:
Read more »