fql Archives - Stay N Alive

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

83a00-ad-5893738

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 developers.facebook.com “Tools” section.

8bc28-graphexplorerlink-2860888

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

b8b9f-graphexplorerpermissions-8202925

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

jessestay/subscribers?fields=id&limit=5000

50a44-graphexplorerurl-5383750

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 SocialToo.com 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

570bd-graphexplorerclick-4515722

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 http://facebook.com/ads/manage 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.

34372-customaudiencecreate-2391561

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.

5833b-jessesubscribers-5244005


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!

02dfc-ad-5481712

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 jesse@staynalive.com!

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

Address: 19AdCAbjshRuEFhx4py1Ny7i48s1d6RFi

75668-bitcoin_tip_blog-2670213


Yahoo Launches SQL Interface to Twitter

yql128-6333387Every time I switch to jQuery, Yahoo’s YUI libraries seem to keep luring me back.  Just yesterday, Yahoo added one more tool to its arsenal of YQL libraries that actually makes the Twitter API intuitive, giving me another reason yet to switch back to yui, or at least consider using Yahoo a little more as I develop tools for the Social Web.  The new YQL set of tables for Twitter enables any developer to use simple SQL-like queries to retrieve and post Twitter data.

For simple user queries, getting a user’s twitter profile data is as simple as something like “SELECT * FROM twitter.status WHERE id=’8036408424′;“.  To insert data, you simply need to provide the oauth consumer key and secret, along with the user’s oauth tokens and you can do things like post new status updates for the user, all in Javascript!  A subsequent call to post a user’s status would look like:

INSERT INTO twitter.status (status, oauth_consumer_key, oauth_consumer_secret, oauth_token, oauth_token_secret)
VALUES (‘tweeting from yql!’, ‘@your_consumer_key’, ‘@your_consumer_secret’, ‘@your_access_token’, ‘@your_access_secret’);

The cool thing about Yahoo’s YQL Twitter interface is I can also choose to only pull specific information out for the user.  I’m not quite sure the benefit this gives you considering Yahoo is probably still retrieving the entire subset of data from Twitter (you can’t pull specific pieces of data out of specific objects in the Twitter API), but at least it’s possible, something I’ve been craving from the Twitter API for quite awhile.  It is unclear if Yahoo is caching this data, and if so, it could provide some significant performance benefits, with Yahoo doing most of the work on their own backend.

Yahoo’s YQL puts them one level above Facebook’s own FQL query language for accessing Facebook data by enabling developers to not only access data like this for Twitter, but also other environments like Facebook as well.  Yahoo has an entire database of “community tables”, where, if specific APIs aren’t provided, the community can create their own tables to that interface and give developers immediate access to those APIs via a simple, standardized SQL interface to those platforms.

This type of API is exactly what I was looking for from the likes of Google’s Friend Connect APIs (and Google has still failed to provide) – a standardized platform where one single API gives me access to all the different APIs out there.  Now with standardized SQL I can access almost any API, and if that API doesn’t exist yet I can create my own interfaces into each API that, once created will also have access via that SQL interface.

Yahoo now has my attention with this launch.  The API has a web interface, where a call as simple HTTP GET to http://query.yahooapis.com/v1/public/yql?[query_params] returns an entire structure of XML data my application can access.  They provide a YUI Javascript interface into the table structure so you don’t need a backend if you don’t want one, and I get all this for all the APIs I interface with.

I will now be looking into the Yahoo APIs as I look to interface the limitless APIs available out there thanks to Yahoo’s focus on cross-platform integration of their YQL interface.  I like that Yahoo isn’t being selfish with this.  With YQL, Yahoo has finally created a glue that lets me access all the APIs I need to access as a Building Block Web brick builder.