Using the Facebook 2.0 plugin

  • 16 favourites

Index

Stats

2,714 visits, 7,637 views

Translations

This tutorial hasn't been translated.

Tools

Status Plugin

With this plugin you can currently fetch all statuses, status likes and status comments by the user that do not include images or external links. This would be a wonderful plugin for a "Who likes my statuses the most" or "Who comments the most" app.

Usage

The "user_status" permission is required for this plugin.

1: In the Construct 2 window right click your mouse and select "Insert new object"

2: Select "Facebook Status" to add it to your application. If for whatever reason, you need to perform this action multiple times at once you can add multiple copies of this object.

3: Now let's fetch some statuses. Go into the event sheet and add a trigger once along with a While logged in(condition available in the base login plugin).

4: Now add the action "Fetch Status". Here's a breakdown of the action dialog.

-- Think of the users wall as a huge array of status updates. So we might have 1000 statuses to flip through or 100. The array is zero based so it would be 0-999 in the example just given.

-- "Start" is the starting point in the Facebook status array. Zero(0) would be the most recent status and 999 in the above example would be the first ever status.

-- "Stop" is how many statuses you wish to actually fetch. So a start of 0 and a stop of 500 would fetch the 500 most recent status updates.

-- "Access Token" is the access token expression that you grabbed from the base login plugin, or any other way that you may have grabbed this token.

-- "UserID" is set to 'me' by default which fetches statuses for the current user. Untested but you should be able to use a users friends status updates by entering their app specific userid and if they have granted the 'user_status' permission.

Expressions

Status_Message(x) - Fetch an actual status message. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field.

Status_ID(x) - Fetch an actual status ID. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field.

Status_Time(x) - Fetch an actual status update time. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field.

Like_ID(x,y) - Fetch an Like userID for a status(The userid for the user that liked your status). x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field. y equals which like in the like array(zero based as well). The like array is specific to a particular status. So fetching this information will only fetch likes for the status specified in the x field.

Like_User(x,y) - Fetch the username for the user that liked the status. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field. y equals which like in the like array(zero based as well). The like array is specific to a particular status. So fetching this information will only fetch likes for the status specified in the x field.

Comment_User(x,y) - Fetch the username for the user that commented on the status. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field. y equals which like in the comment array(zero based as well). The comment array is specific to a particular status. So fetching this information will only fetch comments for the status specified in the x field.

Comment_UserID(x,y) - Fetch the userID for the user that commented on the status. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field. y equals which like in the comment array(zero based as well). The comment array is specific to a particular status. So fetching this information will only fetch comments for the status specified in the x field.

Comment_Time(x,y) - Fetch the time a comment was added to a status. x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field. y equals which like in the comment array(zero based as well). The comment array is specific to a particular status. So fetching this information will only fetch comments for the status specified in the x field.

Comment_Count(x) - Fetch the number of comments attached to a status(This is a 1-10 number, not zero based, so you will need to subtract 1 when referencing the above expressions.). x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field.

Like_Count(x) - Fetch the number of likes attached to a status(This is a 1-10 number, not zero based, so you will need to subtract 1 when referencing the above expressions.). x equals which status to fetch from the array. Zero based so the first saved status will be a zero. Fetching 10 status updates using the fetch status action would mean using numbers 0-9 in the x field.

Status_Count - The number of statuses that we successfully found. If we had tried to fetch 500 from the "Fetch Statuses" action and we received less than 500 in the status_count expression then its safe to assume we have fetched all of the users statuses. If these numbers are the same then we should call the action again to fetch older statuses.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!