Ad

Score API - Update Request Returns HTTP 403 Error, (#200) User Cannot Access This Application

- 1 answer

I'm developing a game on Facebook and having a problem to update the scores of the players.

The application receives HTTP ERROR 403 from Facebook as a response to the update score Graph API call. When I replay the same HTTP post request from other machines it passes without any error.

More information:

  1. Players are requested for publish_actions during registration
  2. The application is registered as a game
  3. The admins of the application don't get the error from FB
  4. The servers which run the applications are behind a load balance

This can't be networking issue since some update requests pass, this can't also be permission issue since the request is passed when executed from other machines.

Does anyone have an idea how to solve the problem or give me a direction to keep on investigating?

HTTP session as recorded by fiddler( XXX is replacing the application access token):

POST /100000868887295/scores/?score=1&access_token=XXX HTTP/1.1
User-Agent: Fiddler
Host: graph.facebook.com


HTTP/1.1 403 Forbidden
Access-Control-Allow-Origin: *
Cache-Control: no-store
Content-Type: text/javascript; charset=UTF-8
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: no-cache
WWW-Authenticate: OAuth "Facebook Platform" "insufficient_scope" "(#200) User cannot access this application"
X-FB-Rev: 677653
X-FB-Debug: gxaao2ZoKOtcQNpLCO4Wh9kXigIhnGByugWQOlg0Y3Y=
Date: Sat, 24 Nov 2012 15:16:03 GMT
Connection: keep-alive
Content-Length: 101

{"error":{"message":"(#200) User cannot access this application","type":"OAuthException","code":200}}
Ad

Answer

Problem solved. We had country restrictions defined in the Facebook application back office. Since our server is not located in one of the allowed countries the requests sent from that server where rejected by Facebook.

Once we removed the country restrictions everything started to work.

Ad
source: stackoverflow.com
Ad