Testing your Actions


Testing Your Open Graph Actions in Joomla

Once your Object and Action have been created in both your Facebook Application and in JFBConnect, the next step is to test them. Before your users can have actions posted to your Timeline, you need to test them on your site and then submit them to Facebook for approval.

Only administrators or 'test users' from your Facebook Application can test your actions. Submitting the Action for approval is your way of stating that the action works (it's successfully posting to the user's timeline) and that it doesn't violate the Facebook Terms of Service. JFBConnect provides all the options necessary to stay within Facebook's ToS, but you should make sure you are enabling each option properly. For instance, the "Read an Article" action we've created here *must* wait at least 10 seconds before pushing the event to a user's Timeline. That's to ensure the user is likely reading the currently article, and not just clicking around your site.

Testing Open Graph Actions

The easiest way to test is simply login with your Facebook administrator account and try to create the action. In our example, reading an article from the specified category. For any On Page Load actions, like our Read action, a popup will appear to notify the user that an action has been added to their Timeline.

Open Graph - Action Confirmation

For actions that aren't automatic, like Joining a Group or Uploading an Image, you can use the Activity Log in the Open Graph area of JFBConnect to see what actions have been posted. The Activity Log is excellent for testing and debugging Facebook Open Graph Actions. The image below is an example of some published actions, as well as one with an error.

Open Graph - Activity Log

In the above Activity Log, the Upload Image to a JomSocial Album (2), the Joining of a JomSocial Group (3), and the Read of Joomla Content (4) all have a status of "Published", which means they were successful. The top Action has a status of Error though and was not published to the user's Timeline. Looking at the FB Error Message, you can see that the object was configured with an incorrect type. The read action for our Facebook App was configured to only work with "article" objects, so we'd want to go into the Object Editor for "Joomla Content" and make sure our Object Type was set properly there.

Creating Test Users

Once we've tested the action on an Admin of our app, we need to create a Test User for our Facebook Application and test with that user. The Test User you create is what a Facebook engineer will also test the action on your site with.

To create a test user, go to your Facebook App Developer area. Click on the "Roles" link on the left.Open Graph - Roles

From here, you can see any users that have special priveleges for your app. We need to create a Test User to test our actions with, so click the "Create" link in the "Test Users" area. In the options popup that appears, select "Approve App" and "Enable Ticker". It's not recommended to enable the "Under 18" setting for testing purposes.

Open Graph - Create Roles      Open Graph - Switch Roles

After you've created the Test User, click the "Switch To" link on that user from the main Roles control panel. This will log you out of your Facebook account and log you in with the test user. From there, go to your website, use the Login with Facebook button and recreate whatever Action you've created.

Once the Action successfully shows up as Published in the JFBConnect Activity Log, you should go to "Facebook.com". You'll see that you are logged in as the Test user. Click on the "Activity Log" and verify that the action is published there as well. If so, you're ready to submit your Action to Facebook!


Social Stream
Refer and Earn

Like our extensions? You're not alone! That's why they're used on tens of thousands of websites. Now you can earn 20% of any sale you refer to SourceCoast.com.

We provide excellent documentation, well laid out sales pages and great support. All you need to do is spread the word and we'll take care of the rest.

Learn About Our Affiliate Program