WearyMonkey
WearyMonkey

Reputation: 2619

Creating Facebook test user friendship returns "(#532) You can't add this user as a friend"

I am writing a script to create test data for my application. The script first creates a collection of test users, and then assigns friendships between them.

I create a friendship between two test users with https://graph.facebook.com/TEST_USER_1_ID/friends/TEST_USER_2_ID?method=post&access_token=TEST_USER_1_ACCESS_TOKEN

However for random users, any friend request involving the user has the response
{"error":{"type":"OAuthException","message":"(#532) You can't add this user as a friend"}}

I can't find anything about this error message.

Upvotes: 1

Views: 2560

Answers (1)

Martin Asenov
Martin Asenov

Reputation: 1298

That's because a normal user can't be friends with a test user. The test user is visible only within the scope of an application, not outside of it.

Upvotes: 2

Related Questions