-2

How can I get order details on facebook. When I send GET https://graph.facebook.com/[order_id] following error is displayed:

{
"error": {
  "message": "An access token is required to request this resource.",
  "type": "OAuthException",
  "code": 104
 }
}
user1871640
  • 441
  • 2
  • 8
  • 18

1 Answers1

1

Like it's mentioned in the error code you need to be have an access token. The access token is generated via OAuth. If you're generating the orders you're already generating access tokens. You just need to pass it along with your Graph API call.

Tutorial to generate access token: http://developers.facebook.com/docs/howtos/login/server-side-login/

The difference is that for orders you need to use application access tokens rather than user access tokens. A related question.

Community
  • 1
  • 1
iDev247
  • 1,761
  • 3
  • 16
  • 36
  • https://graph.facebook.com/[order_id]?access_token=[token_here] now i get following error: `{ "error": { "message": "(#15) This method must be called with an app access_token.", "type": "OAuthException", "code": 15 } }` – user1871640 Mar 14 '13 at 05:33
  • Can you please send some code example... I am new to facebook development – user1871640 Mar 14 '13 at 05:35
  • I updated my answer with [this related question](http://stackoverflow.com/questions/9814517/this-method-must-be-called-with-an-app-access-token). – iDev247 Mar 14 '13 at 05:43