HowTo: save FaceBook comments to excel using PowerBI

Ever wanted to save a bunch of FaceBook comments? Looking for a better way to find old posts that get buried in the timeline? Turns out that Microsoft PowerBI desktop (free download) and Excel (with PowerQuery COM Add-in) can help.

The Short Story:

  • Start a new Query and Get Data from FaceBook. Use ‘Me’ or the ‘ObjectID’ of a page as source. Leave the ‘Connection’ blank, we can drill into timeline or posts on the fly. (hint: ObjectID of a page is simply the last bit of the URL for the page)
  • Drill into the connections Record (the string ‘Record’ is a hyperlink that will expand to show available connections). Drill into either the posts or feed Table (if in doubt, start with posts).
  • If you get an error it is most likely an API limit that can be worked around by munging the source string in the M-language (Advanced Editor). Try something like:
  • Find the post you want (hint: filter ‘message’ column to get a nice alphabetical list of posts which is by far the best way to read mainstream media pages!). Expand the comments Table to reveal the comments you are after.
  • Expand the from column to get name of the commentor, and the object_link column to get other interesting information. (count of likes is always interesting).
  • Close and Load your query, create a simple report table to expose the fields you want in the order you want and either publish them to PowerBI.com or export to a spreadsheet (this whole process can be done from within Excel using the PowerQuery COM add-in, which requires the right kind of Excel license from Microsoft).

PowerBIforFaceBook

PowerBI Desktop makes a great FaceBook browser (and it’s a free download for windows)

The Long Story:

 

Coming soon…

Creative Commons License

Fang – Mike Seyfang

TriBeardLesBones

Advertisements

About mseyfang

Interruptus Digitalis
This entry was posted in blog, howto, Munge, work. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s