Facebook Test Java API update

As Feroz and Aleadam commented on my previous post, it is now possible to copy test users from one application to another in the Facebook Graph API. This functionality is now implemented in facebook-test-java-api version 1.1.4.

Code example

This method copies a test user to another FacebookTestUserStore instance:

   FacebookTestUserStore facebookStore = new HttpClientFacebookTestUserStore("<appId>", "<appSecret>"));
   FacebookTestUserStore facebookStore2 = new HttpClientFacebookTestUserStore("<otherAppId>", "<otherAppSecret>"));
   FacebookTestUserAccount account = facebookStore.createTestUser(true, "<facebook_permissions>");
   account.copyToOtherApplication(facebookStore2, true, "<facebook_permissions>");

This one can be used when you just want to specify the other application information

   FacebookTestUserStore facebookStore = new HttpClientFacebookTestUserStore("<appId>", "<appSecret>"));
   FacebookTestUserAccount account = facebookStore.createTestUser(true, "<facebook_permissions>");
   account.copyToOtherApplication("<otherAppId>", "<otherAppSecret>", true, "<facebook_permissions>");

Note that <appId> and <appSecret> should be replaced with the values from the application to copy from (the one owning the test user), <otherAppId> and <otherAppSecret> should be replaced with the values for the application to which the user should be copied.

How to get it

It is available on Maven central, use the following dependency:


or have a look at the project page for downloads:

This Post Has 2 Comments

  1. Puccinelli

    Creating a fan page is an essential way to promote, if you know what to do to use it well. Probably why it’s so difficult is because the administrator’s don’t speak their audience’s language. Obviously it’s not easy, as it’s tricky to build a nice-sized fan like base.

Leave a Reply