0

I am able to access checkins and locations by url, using the Graph API Explorer with my app.

So, the user tokens seem to be OK.

Now, when I try :

$ curl  "https://graph.facebook.com/[my id]/locations?access_token=[my app token]

it states:

{"error":{"message":"A user access token is required to request this resource.","type":"OAuthException","code":102}}

In the Graph API Explorer, I've enabled every single permission for my app. I've tried checkins and locations, and neither works. I can see basic info, likes, friends, etc., but no location info.

App Settings

Enabled August 2012 Breaking Changes: Remove offline_access permission:

Disabled Stream post URL security: Forces use of login secret for auth.login: September 2012 Breaking Changes: October 2012 Breaking Changes:

I am reading through all of the stackoverflow topics on this, and I'm reading through the documentation, but I seem to be missing something.

Any idea what I am missing?

Thanks,

Eric

ericp
  • 611
  • 2
  • 11
  • 17

1 Answers1

0

OK, so I wasn't clear on understanding how the user token came into play, even though there are other posts talking about it, as well as user1438003's comment.

I can grab the user token from the php-sdk facebook api, make sure it is long-lived via 60 days:

https://graph.facebook.com/oauth/access_token?client_id=[my app id]&client_secret=[my secret]&grant_type=fb_exchange_token&fb_exchange_token=[user token]

this returns a new user token.

https://graph.facebook.com/[user id]/checkins?access_token=[new user token]

this returns the info I expected.

ericp
  • 611
  • 2
  • 11
  • 17