five steps to get facebook engagement indicators

16
Five Steps to Get Facebook Engagement Indicators Created by The Curiosity Bits Blog (curiositybits.com) With the support from Dr . Gregory D. Saxton

Upload: cosmopolitanvan

Post on 10-May-2015

430 views

Category:

Education


2 download

DESCRIPTION

In this tutorial, you will learn how to get: 1. # of likes, shares and comments for all posts on a Facebook page. 2. Content lifecycle: the amount of time for how long the content can drive user attention and engagement.

TRANSCRIPT

Page 1: Five Steps to Get Facebook Engagement Indicators

Five Steps to Get Facebook Engagement Indicators

• Created by The Curiosity Bits Blog (curiositybits.com)

• With the support from Dr. Gregory D. Saxton

Page 2: Five Steps to Get Facebook Engagement Indicators

What are Facebook Engagement Indicators?

• Facebook users interact with content through liking, sharing and commenting (L-S-C). The L-S-C represents a hierarchy of user engagement.

commenting

sharing

liking

Content lifespan

Page 3: Five Steps to Get Facebook Engagement Indicators

Getting ready!

• In this tutorial, you will learn how to get:• # of likes, shares and comments for all

posts on a Facebook page.• Content lifecycle: the amount of time for

how long the content can drive user attention and engagement.

Download the codehttps://

drive.google.com/file/d/0Bwwg6GLCW_IPZlpVOHZ2amZJR2c/edit?usp=sharing

Page 4: Five Steps to Get Facebook Engagement Indicators

Getting ready!

• Please complete all steps in our previous tutorial: Mining Facebook Fan Page – getting posts and comments (http://curiositybits.com/python-for-mining-the-social-web/python-tutorial-mining-facebook-fan-page-getting-posts-and-comments/)

• From the previous tutorial, you have generated a SQLite database that includes:• Posts: all posts on a Facebook page

• Content, posted time, included URLs, mentioned Facebook friends/pages, etc.

• Comments: comments to the posts• Sender, content, posted time, etc.

Page 6: Five Steps to Get Facebook Engagement Indicators

Have you installed these necessary Python libraries?

Step 1: Checklist

Page 7: Five Steps to Get Facebook Engagement Indicators

Step 2: creating new columns

• In previous tutorial, we have created various columns in the database. But in this run, there are THREE columns defined in the script, but are NOT existent in the current database. We need to create them manually through SQLite Database Browser.

Page 8: Five Steps to Get Facebook Engagement Indicators

Three columns used in the script, but are not yet created in SQLite database.

Step 2: creating new columns

Page 9: Five Steps to Get Facebook Engagement Indicators

Now let’s create the three columns:

• In SQLite Database Browser, choose [Edit] – [Modify Table] – [Edit] – [Add Field]

name type

Feed_id Integercontent_cycle Stringcontent_cycle_new String

Step 2: creating new columns

Page 10: Five Steps to Get Facebook Engagement Indicators

• Final check: make sure all columns defined in the script are existent in the SQLite database.

All columns defined in the current script.

Step 2: creating new columns

Page 11: Five Steps to Get Facebook Engagement Indicators

Step 3: Connecting to the existing DB

Now, Python is asked to connect to the existing database through the following block of code:

• Use a shorten file path if the current SQLite database is in the same folder with the Python code. IF NOT, use a full file path such as sqlite:///C:/xxxx/xxx/xx.sqlite

• Please save the Python code in your default Python folder (e.g. __\Anaconda\Lib\site-packages)

• Learn how to find your default Python folder? Review page.25-27 in http://curiositybits.com/python-for-mining-the-social-web/python-tutorial-mining-twitter-user-profile/

For example

Page 12: Five Steps to Get Facebook Engagement Indicators

Hit RUN!

Page 13: Five Steps to Get Facebook Engagement Indicators

Step 4: Confirming the engagement indicators are generated

Page 14: Five Steps to Get Facebook Engagement Indicators

Step 5: Learn how the engagement indicators are calculated

You may wonder how the two engagement indicators - content_cycle and content_cycle_new – are calculated

Page 15: Five Steps to Get Facebook Engagement Indicators

Simply put, content_cycle = (the time of last comment posted – the time of the post published)

Step 5: Learn how the engagement indicators are calculated

Page 16: Five Steps to Get Facebook Engagement Indicators

Content_cycle_new is the content lifecycle, after controlling for the amount of time of the content being live.

Specifically,

content_cycle_new = (the time of last comment posted – the time of the post published)/time_since_post

where, time_since_post = the time of the data mining – the time of the post published

Step 5: Learn how the engagement indicators are calculated