How to Test FB Apps

How to Test FB Apps thumbnail
Social media, such as Facebook, are very popular.

Facebook (FB) applications are integrated into the Facebook user interface. For example, your Facebook application can use Facebook functionality, such as Requests, which allow users to invite their friends to interact with your application. Test your Facebook application using test user accounts. These accounts are associated with your application and expressly used to test the application's functionality. Create up to 500 test users for each application and use them to test either manually or using automated testing.

Instructions

    • 1

      Use the Graph application programming interface (API) as follows to create a test user associated with your application:

      https://graph.facebook.com/APP_ID/accounts/test-users?

      installed=true

      &name=FULL_NAME

      &permissions=read_stream

      &method=post

      &access_token=APP_ACCESS_TOKEN

    • 2

      Use the "Installed" Boolean parameter to have your application installed for the test user when the account is created.

    • 3

      Use the optional "Name" parameter to indicate the test user's name. Facebook also uses the name in test user's assigned email address.

    • 4

      Use the "Permissions" parameter to specify a comma-separated list of extended permissions. Facebook grants the specified extended permissions for the new test user to your application if the "Installed" parameter is "True." Extended permissions are one of three types of Facebook permissions and include permissions, such as access to any friend lists created by a user.

    • 5

      Use the "Method" parameter for the various methods which allow you to interact with Facebook, such as the "Get" method.

    • 6

      Use the "Access_token" parameter to identify the unique application identifier formatted as follows: {app_id}|{app_secret}.

    • 7

      Facebook responds as follows when you call the Graph API:

      {

      "id": "1234...",

      "access_token":"1234567..." ,

      "login_url":"https://www.facebook.com/platform/test_account..."

      "email": "example...@tfbnw.net",

      "password": "1234..."

      }id : User id of the test user

    • 8

      Use the "Access_token" value to make API calls on behalf of the test user if your application is installed by the test user.

    • 9

      Go to the "Login_url" to login as the test user. The URL expires after first use or one hour to preserve the security of test accounts. Call the "Get" method to refresh the URL.

    • 10

      Use the email address indicated by "Email" if logging in manually.

    • 11

      Use the "Password" as the test user's password if logging in manually. Store the password because Facebook returns the password only when the test user is created. Facebook only stores the hash and not the password itself. Change a test user's password by issuing a POST request in the Graph API with a password parameter associated to the test user ID.

Tips & Warnings

  • Test users have the following limitations:

  • Interaction is allowed only with other test users and not with real Facebook users.

  • They cannot create public Facebook content, such as writing on a wall. Test users can view and interact with the application tab on a Page if they are associated with the corresponding application. Any developer of an application can access and use the test users for the application. Test users only have test privileges for the associated application. They can use the application in either live or sandbox modes but cannot edit technical settings or access insights for the application. Test user accounts cannot be converted to real Facebook user accounts.

Related Searches:

References

  • Photo Credit Stockbyte/Stockbyte/Getty Images

Comments

Related Ads

Featured