Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating A Test User on Facebook

I am new to Facebook application development. I want to create a test user for my application but when I try it using the API

 https://graph.facebook.com/APP_ID/accounts/test-users?installed=true&
name=FULL_NAME&permissions=read_stream&method=post&access_token=APP_ACCESS_TOKEN

It displays the following error:

{
  "error": {
  "type": "OAuthException",
  "message": "(#15) The method you are calling must be called 
              with an app secret signed session"
  }
}

I have read & followed the steps mentioned on

https://developers.facebook.com/docs/authentication/

Still the problem persists. Please guide me, what should I do?

Thank You.

like image 529
mandar.gokhale Avatar asked Aug 05 '11 09:08

mandar.gokhale


People also ask

How do you create a test user?

You can create test users in the App Dashboard by going to the Test Users section in the Roles > Test Users panel and clicking the Create test users button. This will open a dialog that allows you create up to 4 test users at once.

Can I create a test Facebook page?

Creating Test Pages To create a test page, log into one of your app's test users and create a Facebook Page as you normally would. To log in as a test user: Go to the Apps panel and select your app to load it in the App Dashboard. Go to Roles > Test Users and click an existing test user's Edit button.


1 Answers

You need to get a valid access token - the application access token will do. To get this use:

https://graph.facebook.com/oauth/access_token?client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&grant_type=client_credentials

substituting YOUR_APP_ID & YOUR_APP_SECRET with your respective values.

This will return a valid access token that you can substitute for APP_ACCESS_TOKEN in:

https://graph.facebook.com/APP_ID/accounts/test-users?installed=true&name=FULL_NAME&permissions=read_stream&method=post&access_token=APP_ACCESS_TOKEN
like image 165
jBit Avatar answered Oct 07 '22 03:10

jBit