0

I have 2 test users in facebook. I want to make them friends using Facebook Graph API:

https://graph.facebook.com/v2.6/user1_id/friends/user2_id?access_token=user1_access_token
method: post

I get error:

{
"error": {
"message": "(#33) This object does not exist or does not support this action",
"type": "OAuthException",
"code": 33,
"fbtrace_id": "A7EHydY_B4x......."
}
}

Can someone please help?

Thanks.

biruk1230
  • 3,042
  • 4
  • 16
  • 29
Yana
  • 1

1 Answers1

0

https://developers.facebook.com/docs/graph-api/reference/v6.0/test-user:

An app access token is required to update these fields for any test users associated with that app.

You need to use your app access token for this, not a user token.

CBroe
  • 91,630
  • 14
  • 92
  • 150
  • https://developers.facebook.com/docs/graph-api/reference/v6.0/test-user/friends says, you can not perform publishing operations using this endpoint. So where did you find this described as a valid API call in the first place? – CBroe Feb 24 '20 at 11:31
  • here somebody said he did it: https://stackoverflow.com/questions/24046772/how-to-add-test-friends-to-facebook-test-users-programmatically-using-facebook-i Do you have another way how to make test user friends? – Yana Feb 24 '20 at 12:02
  • That is from about six years and four API versions ago … (never rely on anything that old in the first place when it comes to FB APIs, always go read up on what is currently available in the documentation.) It looks like they might have simply removed this, so you need to manually make them friends via the app dashboard then. – CBroe Feb 24 '20 at 12:08