graph api – Stay N Alive

Growth Hacking: How to Target Ads to the Followers of a Public ("Follow") Profile on Facebook

I shared earlier on this blog the benefit of using a personal, “Public Profile” on Facebook over a Fan Page on Facebook to personalize the experience and grow your network. I encourage each of my clients to, when they have the choice, choose the public profile over the Fan Page for personalities in the company for the reasons I shared earlier. It personalizes the company better, and I think the opportunities to grow organically are stronger.

There has always been one downside though – you can’t advertise to the followers of public profiles. It turns out there is actually a way to finally advertise to the followers of a traditional profile on Facebook with a “follow” button. It involves just a little Graph API knowledge (see my book to learn!), use of Graph Explorer, and a Facebook Page for your brand that you can use to create the ad. Here’s how you do it – let me know if I can help your company or brand do the same!:

Using Graph API to Get the User’s Followers

The trick involves just a little Graph API (the Facebook developer platform used to get data out of Facebook). To start, open up Graph Explorer from the “Tools” section.

Give your user the “user_subscriptions” permission by clicking on the “Get Access Token” button and checking the box under “User Data Permissions”.

Now, type in the following path next to the “GET” drop-down:


You can replace “jessestay” with the id of any public user. The limit=5000 lets you traverse through the more subscribers at a time. Hit “Submit”, and a bunch of data will be returned.

Now is the part you need to figure out, and where a little programming knowledge might help (I may upload this as a tool on at some point if it makes sense). Each page has only 5,000 subscribers listed, but there is a “next” link at the bottom that takes you to the next 5,000 subscribers. Your job is to traverse through this list, follow all the “next” links until there are no more, and extract a list of facebook ids in a text file (csv or txt). You can do this either manually or through an automated script that you create

This script took me about 15 minutes to write on my own, so it’s not too difficult a task if you have a little programming knowledge. Of course, this is also a service I provide to my clients so let me know if I can help! Once you have this file, you’re ready for the next step!

Uploading the Followers to Ad Manager

Now that you have your file, you need to upload it to Ad Manager as a “custom audience”. This used to only be available to Facebook’s Power Editor, but it’s now a native piece of the Facebook Ad management experience.

Start by going to and make sure the account you’re using is selected (for those that might manage multiple accounts like me). On the left is a link that says “Audiences”. Click on that.

Now, click on “Create Audience”. A dialog box will appear – select “Data File” from the dialog box.

Now name your audience whatever you like, and choose the file you just created in the above section. If it’s a text file that has a Facebook ID on each line of the file it should work. Also, make sure you select “advanced options” and “user ids” so it recognizes your ids as Facebook ids and doesn’t try to read them as email addresses. Click “Create Audience”, and now your custom audience should be created! Pretty quickly you’ll start seeing the number of potential people you can target show up next to the audience stats on this page.

Creating Your Ad

Now that you’ve created your custom audience out of the user’s subscribers, you just need to create an ad that targets this custom audience. This is where you’ll need an existing Facebook Page for your brand (Not the user themselves – to me Facebook Pages are for brands. Facebook Profiles are for users!) if you want to do a promoted post. If you don’t want to use another Facebook Page you can just do a right-nav ad that targets a URL and that will work too.

Start by creating a promoted post using Ad Manager, or on the Page itself (don’t use the “boost” option!). You can make this visible or invisible to your fans – it’s up to you. Include a link if you like, just text, or whatever you want. Maybe even put the image of that user in the post so it’s recognizable to the fans of that user. Another option is to have your Facebook Fan Page share a post of that user, and then you can promote that!

Then in your targeting options, select the custom audience you just created. You can further refine the audience if you like, should the post be needed to target a specific subgroup of that audience (allowing for much stronger micro-targeting and perhaps even better results for less cost). Set all your bidding options, submit the ad, and now you have an ad targeting all the followers of a specific user on Facebook!

The great thing about this is you don’t have to limit it to subscriptions – it works with any data your user has access to. You can access your friends, your friends’ friends. You can target the attendees of an event you’re going to. Or members of a group you participate in. You also don’t need to limit it to your own user if you’re targeting just followers. Because public profiles are public, you can target the followers of any user that has their profile marked as public!

Just a side-note: I did notice a bug in Facebook’s Graph API that doesn’t return all of the subscribers. I think it excludes subscribers that are subscribing to you through Facebook lists. It will return most though, which makes an ad campaign totally worth it!

So when you think you have to use a Fan Page because you can’t advertise on a public profile, think again! You indeed can target subscribers of public profiles on Facebook, making the use of a public profile even more powerful, and something every brand should consider!

Let me help your brand! These little “Growth Hacks” are the core of our business, and how we excel against other marketers and firms in this space. If you want to get an advantage against your competition that other marketers can’t touch, send an email to!

Oh, and like what you see here? Did it help your marketing strategy? Please consider sending donations to (Paypal), or send me Bitcoin!:

Address: 19AdCAbjshRuEFhx4py1Ny7i48s1d6RFi

Developers: Here’s How You Access #Hashtags in Your Apps

I showed earlier tonight a way you can access on the stream for any particular hashtag without having to have a link to get to it. I mentioned Facebook would likely release an API for this. Being the idiot that I am I neglected the fact that Facebook already has a search API, and you can start using it right now.

Anyone, developers or not, can do this right now. Go to – add to it the URI variable q, specify a query (in this case your hashtag keyword prefaced by %23, the URI-encoded version of the # sign), and they add “type=post” to the URI string. In laymans terms, here is how it looks:

Just take the above query, put it in your browser (or send it in your app via a GET request), and it will return a JSON-encoded string you can parse and use in your apps. For the non-developers out there, that means there will be a bunch of {‘s and }’s and [‘s and ]’s with the list of all the public posts for that particular hashtag. It’s really simple!

The above example uses the hashtag #hashtag – to change it to something else, just replace “hashtag” with your keyword of choice. This one will do #fail:

Try it yourself and let me know if you see any quirks. So start coding my hacker friends! (and start learning if you’re not!)

7 Strategies I’m Pitching for Businesses to use Facebook Places

Facebook Places is the latest and greatest service offered by Facebook that has many Brands raging around how to build a strategy.  Never has the advertiser or brand had so many options as they do now on Facebook to target demographic, interested parties, that you can now actually track whether they’ve been to your physical location!  My good friend, Jolie O’Dell of Mashable, wrote a great post on the American Express Open Forum last week on “How SMBs Can Start Using Facebook Places Now”.  Granted, the brands I’m used to working with lately are much larger entities and far from SMB, but I think the strategies I suggest in the large corporate Brand environments can still apply in a Small Business setting.  In addition to what Jolie recommended (which are great tips), here are some of the ways I’m suggesting businesses deploy Facebook Places.  Also note that these strategies only work if your customers (or visitors or users) actually have a place to meet and congregate in real life.  Perhaps you could create these real life places for them as part of your strategy.

Claiming the Place – Why This is Important

Jolie Touched on this – she said that as a business you can claim a “Place” and turn it into a real “Page” (or “Fan Page”) on Facebook that you can manage, add pictures, moderate, and more as soon as you’ve proven you are the owner of the actual location.  This is powerful, and you want to be sure you’re doing this if you want to be aware of what’s happening online at your locations.

Here’s why it’s powerful.  Let’s say you have an event at a particular store – let’s say it’s a grand opening.  Or let’s say you’re a band and you’re performing at a particular arena.  Now you can have a physical location you can brand in preparation for your event.  Let’s say your store is a restaurant and you have a menu you want to be sure only your Facebook customers are aware of.  You can post that on the Facebook Page, since you claimed it, and only those that check in on Facebook can know about it.  Or perhaps you own a venue and you want to pitch events to frequent visitors.  Anyone visiting your Page currently can see what’s coming up and what they can look towards in order to come back again at the right time.

I’m not going to cover this now, but I have a hunch that you’ll even be able to advertise with this data in the future, so it’s to your benefit to try to own these venues that people are checking into on Facebook. (What happens when Facebook enables Push notifications on the iPhone in the future for Venue owners?  Just a thought.)

Deals, Deals, Deals! (and Events)

Here’s where a little API knowledge is helpful, and why you’re going to want to read my next book that comes out in a few months. (hint, hint)  Right now you can make a simple call to[place page id]/checkins, appending an access token you get from Facebook to identify your application and you can have all the people that have checked into your place.  With a little code, all you have to do is add a tab to your Facebook Page, query that URL above to get the list of people that have Checked in, and if the current user visiting the tab is in that list you can offer them a special deal, only for people that have checked in on Facebook.

This has several benefits.  First, for each person that checks in on Facebook their friends see that checkin and have the opportunity to click through and like your Page (you did claim the Page, right?) and learn about your Page.  Hopefully you have a welcome Tab (which I talk about below) to welcome those people.

Second, it gives people motivation to visit your location.  You could set up a deal that offers a discount at the store only if they’ve previously checked in on Facebook Places, or perhaps they have to check in more than one time.  You could almost turn this into a loyalty rewards system of some sort.

Or what if you’re managing an event?  Let’s say you’re a band and want to promote your latest CD.  You could offer a sneak preview of streamed songs only to your most loyal and devoted fans who have checked in at one of your concerts and have liked the Page (I would require both, as once they like the Page you can then promote future events and sales).


One thing I really like about Places is that for each Place users check into you have a running tally of everyone that attended that event or visited that store or location that felt the need to check in on Facebook.  I can now go through that list and get a running total of how many people are checking in on Facebook and what they’re saying during their visits.  Let’s say I run Best Buy’s Social Media campaign.  I could now have a running view of what type of experience all the visitors of my stores are having as they check in (assuming they want to share that experience).  We could maybe even feature some of those on our main corporate website using Graph API.  You can browse this manually or use the Facebook Graph API to tally it automatically for you (with very little effort).

SMS – Yes, Facebook Has This, Too

One little used feature on Facebook Pages is something I think that has a very powerful effect.  I use this every time I speak.  Did you know that if you send the text message “like stay” to 32665 (FBOOK on your mobile phone) you’ll get regular updates sent to your cell phone of every post I publish on  Try it. 🙂  Not only that, but you have now liked my Facebook Page, and even if you turn off the mobile phone updates you’ll get them in your Facebook News Feed.

Since you claimed your Checkin location as a Page, you can now do this for your Page as well.  I think every retail store in the world should have a sign that says, “Send ‘like suchandsuch’ to 42665 (FBOOK) on your mobile phone for updates and deals!”  This gives you a distribution channel right to the actual hands of every customer of yours that takes advantage of this, bringing more engagement and more participation by your customers.  This is a very powerful tool you should be taking advantage of.

Or, what if you’re a band?  Take a moment during your concert to ask your fans to do that, right then, then have everyone hold up their cell phones showing that they did, swaying back and forth as you begin the next song.  Then, send out a message to your fans during the concert offering a special deal on the CD for the concert that only those that checked in at the concert can take advantage of.  See what I mean?  You’ve just acquired an audience of thousands that have come out to see you in person, all at once.

The Welcome and Other Custom Tabs

The Welcome Tab is powerful.  Check out my article over on Techipedia on how to set this up in a simple manner.  Since you claimed your Place as a Page, you can now add these to your Place.  You should use these to welcome new customers visiting the Page (keep in mind that most people checking in probably haven’t liked the Page yet, so you want to be sure to give them a welcome message and get their e-mail or promote a deal or something similar that encourages them to like the Page).  You can create tabs for specials you offer.  Remember what I said above about offering special deals to people that checkin at your locations?

Most Frequent Customers

One custom tab you can offer is one that the Social Media development firm, Context Optional, created that creates a “Leaderboard” on your Page of the top checkins for your location.  I think there is value in knowing the most frequent customers of a location.  You could offer a contest, giving a deal to the 10 most frequent customers of your location, for instance.  This is a great way to find out who your most loyal fans and customers are and reward them as such, creating competition with others to also do the same.  If you need a similar tab contact me and we can talk about getting this added to your SocialToo account as well.


This post is about Facebook Places, but I did want to briefly mention FourSquare.  Gowalla also has similar strategies you can employ.  There is one strategy with these that I think brands should employ, and will target a younger audience (Facebook’s average age is 38 right now – FourSquare’s and Gowalla’s should be much younger).  That is the process of creating an account on FourSquare for your brand and encouraging your customers to follow it.  Then, post “Tips” for your place – this can be a deal, or additional info, or whatever you like.  Then, when people who are following your brand on Foursquare check in nearby your locations, they’ll get these tips and hopefully feel motivated to come by and take advantage of what you have to offer.

I’ve only mentioned a few strategies here – there are so many more you can take advantage of!  Knowing the location of your customers and knowing, especially when they’re checking into your location is a powerful concept and gives you so many opportunities to virally grow your brand online.  I strongly suggest you take a look at how Facebook Places can benefit your brand – this is perhaps Facebook’s most powerful tool ever to enable brands to engage and convert sales from customers.

Want to learn more cool stuff like this?  There are just 3 more days until the 50% off deal is over for Facebook Success Summit registration (after that it’s full price).  I’ll be one of the presenters and will be covering stuff just like this.  I get 50% of all sales through this site (I don’t get paid otherwise), so please register now!

Facebook Kills Connect, Makes App Creation Easier, Simpler

As I’ve been writing Facebook Application Development for Dummies (now available on Amazon for pre-order!), there has been one thing I have been noticing: Despite all the new focus on Facebook’s Graph API, Facebook has still had a lot of conflicting focus on their old, more complicated, Connect APIs, making it a fun thing to try and explain in a Dummies book.  That confusion was evident especially in the application creation screens, where Facebook had page after page of options to fill out that they were no longer focusing on, “Widgets” to configure (which Facebook doesn’t even link to any more), and odd terminology that just doesn’t make sense any more.  Add to that the fact that, just announced, Facebook is killing the FBML versions of apps in favor of the iframe (and FBML itself in favor of Social Plugins), a lot of stuff just didn’t make sense in their app creation process any more.

Some time recently it appears Facebook finally fixed that.  Now Facebook has just 5 categories to fill out when creating your application or Facebook-integrated website, and there are no confusing terms such as “Connect”, or “Widgets”, or “Canvas”.  Facebook is focusing on 5 things: “About”, “Website”, “Facebook Integration”, “Mobile”, and “Advanced”.  I think from the titles of the sections these things are obvious, and it also shows that Facebook is putting an increased focus on external use of their applications on websites and mobile and less on Facebook itself.  We also see this with the removal of custom tabs on personal profiles (they will still be available for your business Page, have no fear!).  In addition, Facebook has removed the long Application key, and is now putting focus on just the Application ID and Application Secret – this is a move they have been pushing towards since the launch of Graph API at their F8 developers conference earlier in the year.

The new Facebook Application Screen is simpler and easier than the old

In addition, Facebook has added 3 experimental new features you can turn on, to focus more on their new OAuth 2.0 authentication process.  One of my biggest frustrations in trying to document all of this in my book has been the lack of consistency.  Getting graph API to handle authentication on a app in the past has been a horrendous experience, pretty much forcing developers back to the old way of authorization.  Now it should be easier for developers to fully focus on the new Graph API methods, both in and out of Facebook.  It is completely clear that Graph API is the future, and Social Plugins are replacing FBML (unfortunately for my second book).

Facebook also added 3 new features, making OAuth 2.0 easier to manage on Canvas pages.

While frustrating as I try to adapt my book, these changes are welcome, and should make creation and configuration of apps much easier for developers in the future.  Especially with the future removal of the need to configure FBML or iFrame, along with Profile tabs, setting up an application should be a piece of cake for both novices and experienced developers alike.  I’m sure it also makes the support process for Facebook a lot easier as well.

I hope other app platforms can take Facebook’s lead on their API.  Out of all of them, Facebook’s new focus is dirt simple and easy for the most novice of programmers to learn.

Are you working on a Facebook app?  How does this affect your development on Facebook platform?

Want Your Business in a Dummies Book?

I’m looking for concrete examples of businesses, large and small, that have seen firm success by integrating Facebook either as an application, a Page, or on their own website via Facebook Connect or Facebook Graph API.  If you have analytics and statistics to back up your claim, I’d like to get quotes from you on how Facebook’s API has helped your business.  The best ones I’ll be including in Facebook Application Development for Dummies.

This is a great opportunity for your business or website, as your brand will be promoted, pushed, and shared with an audience of thousands (wouldn’t it be cool if it were millions?) of readers worldwide, in a brand that is recognized in bookstores everywhere.  So if you, or someone you know has a great story to tell about how the Facebook API has helped your business, I’d like to share those case studies with my readers.  The best ones I’d like to also try and share on this blog if you’re okay with it.  Feel free to share them in the comments if you want everyone to see, or send them to

Oh, and and not to show preference, but if anyone has any good contacts at Digg – I really want to see if their integration of Facebook Connect has helped.  I think that would be a great example to share – send them my way if you think they might be interested.

This book is a group effort – I hope to include you in many more opportunities like this, so keep reading and subscribing!

Google: You Have the Same Thing as Facebook – Why Not Promote It?

Google is sitting on a gold mine opportunity right now and all I hear is complaining from their employees.  Matt Cutts Deactivated his Facebook account and Tweeted about it to tell the story.  Chris Messina called Facebook the dreaded “evil” word, and criticized the idea for being decentralized.  Frankly, I’m getting tired of it and it’s making Google look desperate.  Instead, here’s what I’d rather see Google doing:

Promote the Heck Out of Google Social Graph API

I don’t get it – Google employees are criticizing Facebook for not being decentralized when Facebook did just that.  With the OpenGraph Protocol, any platform on the web can now implement a similar Pages network and integrate with the network of Pages Facebook is bringing into its own network. The opportunity is open to all, not just Facebook.  Facebook even went to the extent of releasing that protocol under the Open Web Foundation agreement, solidifying that they were okay with others copying it.

Google has been promoting something similar – XFN links and FOAF attachments (along with “me” relationship identifiers to identify an individual as the same person across the web).  In fact, Google built an API around it so others can have access to these protocols.  Guess what?  Facebook has an API as well for the OpenGraph protocol (called, quite similar “Graph API”).  Has Google opened up their Social Graph API? No. (meaning, not any other network can copy the protocol of the API and use it as their platform as well)  Neither has Facebook.  There’s nothing wrong with that – they have to compete.

Google has a huge opportunity right now to be riding the coattails of Facebook on this announcement by promoting its SocialGraph API and how it’s a little better for the web than what Facebook is doing with its API around the OpenGraph.  Rather than complain about what Facebook is doing, why not take the positive route and push that you have something better?  Google has an incredible opportunity here to finally make the SocialGraph API really big, and they’re squashing it by spending their energy canceling their Facebook accounts and criticizing their efforts publicly.  I think it’s totally the wrong move for Google to be making right now.  Their PR department needs to get ahold of their employees and formulate a strategy for response.

Promote the Heck Out of Google Friend Connect

On top of the APIs and OpenGraph or SocialGraph related protocols (again, emphasis on the protocol being the open part of both networks – none of the other stuff, on both Google and Facebook’s side is), all that was launched by Facebook on Wednesday was a series of Widgets that lie on top of all this to make implementation of everything very easy.  Google has the same thing, yet I have not heard one peep from Google employees about it since then.

Google’s product is called Friend Connect.  Look at the Friend Connect page of widgets here and then look at the OpenGraph Social Plugins page here and tell me how they differ?  The main difference is Google actually has more widgets than Facebook does.  Kevin Marks, former Google employee who initiated OpenSocial and the Friend Connect program at Google, was quick to point out to me on Twitter that even Friend Connect has a like button (you can see it on his iPad Knees Up site in the upper-right here), and it requires a Google login to use!  How is that any different than what Facebook is offering?  You can see an example of Friend Connect in action over to the right where you see everyone’s profile pictures (note you didn’t even have to log in to see those, and there is no opt-out).

This is Google’s time to shine – show businesses that they can promote Twitter users and iGoogle users and Buzz users and Orkut users, and provide all the same functionality Facebook is providing, just as easy as they are (with the exception of that extremely simple Graph API Facebook just launched).  Come up with new features that compete where you’re not at their level yet.  The world doesn’t know about this yet.  Google has more people using its network than Facebook does – Google needs to flaunt this, not complain.

Start Building on Facebook’s OpenGraph API and Stop Complaining

I’m sure I’ll get plenty of complaining responses by Google employees and former Google employees from this, but, I really hope they take this to heart and rather than argue with me on this, just go out and promote the products that they have.  They potentially have something even bigger than what Facebook has, and it’s extremely important that the world knows about this.

Google really should consider taking advantage of this new protocol by Facebook – integrate it on its own sites, just as it expects Facebook to do with FOAF and XFN.  Find ways to search and index this data in ways that Facebook just doesn’t have the advantage.  They should find ways to integrate Facebook login (it’s just OAuth 2.0 now!) into their Friend Connect login process – Facebook’s being completely open in this.

I’ve been arguing on Twitter with Kevin Marks about Google’s past attempts to integrate Facebook Connect into Friend Connect.  They were denied, because they were displaying user data without user permission before.  He referred to this page in the Terms of Use for Facebook.  The thing is, Facebook has provided means around this problem.  Facebook is all about user privacy, even down to the developers that integrate their platform.  Google got shut down because they weren’t using the means Facebook set out to use their data.  There is a specific permissions API Facebook released within a month after Google launched Facebook support in Friend Connect (and got shut down), just to solve Google’s problem and Google never used it.

It’s time Google start accepting these Facebook social graphs.  Let us bring our Facebook friends into Google’s network – there’s not even a storage limit any more!  Google needs to start playing nice or they’re going to get left in the dust.  It’s time to stop complaining and take the ball back into your own court, Google.  Otherwise I’m going to have no choice but to abandon Google products and go where my real friends are playing.  That’s not a threat – it’s just the reality of where I’m being forced to go.