1
votes

According to facebook development site. https://developers.facebook.com/docs/graph-api/reference/v2.0/app/app_link_hosts

Under Publishing section I tried with Android SDK but got this error
{"error":{"message":"(#200) Permissions error","type":"OAuthException","code":200}}

I tried with Curl option but got the same error
{"error":{"message":"(#200) Permissions error","type":"OAuthException","code":200}}

Ok so I double check my permission﹕ [public_profile, rsvp_event, publish_actions] I have the correct permission It is so simple. Unless I miss something.

EDIT Also check that the access_token is passed in.

If anyone have a solution please share.

1
You made sure that the accesstoken that you are using have those permissions? - WizKid
yes I had the access_token set. but still not working. will edit the question to make is clear thanks. - iceman
How did you check that you have the permissions? Make sure to check the access token - WizKid
Session.getActiveSession().getPermission() show current permission. and within session object there exist access_token. I also try to pass it down with parameteres in Request object. But still not working. - iceman
I would suggest debugging the access token in developers.facebook.com/debug and then try to make the request in Graph Explorer developers.facebook.com/tools/explorer just to make sure you get the same error there. If you still get permissions error I would file a bug at developers.facebook.com/bugs with exact repro steps - WizKid

1 Answers

2
votes

I faced the similar problem like you did. It turns out that there are various types of access tokens. https://developers.facebook.com/docs/facebook-login/access-tokens,

  • User Access Token – The user token is the most commonly used type of token. This kind of access token is needed any time the app calls an API to read, modify or write a specific person's Facebook data on their behalf. User access tokens are generally obtained via a login dialog and require a person to permit your app to obtain one.

  • App Access Token – This kind of access token is needed to modify and read the app settings. It can also be used to publish Open Graph actions. It is generated using a pre-agreed secret between the app and Facebook and is then used during calls that change app-wide settings. You obtain an app access token via a server-to-server call.

  • Page Access Token – These access tokens are similar to user access tokens, except that they provide permission to APIs that read, write or modify the data belonging to a Facebook Page. To obtain a page access token you need to start by obtaining a user access token and asking for the manage_pages permission. Once you have the user access token you then get the page access token via the Graph API.

  • Client Token - The client token is an identifier that you can embed into native mobile binaries or desktop apps to identify your app. The client token isn't meant to be a secret identifier because it's embedded in applications. The client token is used to access app-level APIs, but only a very limited subset. The client token is found in your app's dashboard. Since the client token is used rarely, we won't talk about it in this document. Instead it's covered in any API documentation that uses the client token.

So the access token in this case is referring to App Access Token. You can obtain one using the API Explorer:

API Explorer

Note that you also need to be the admin of the Facebook app to be able to get the an App Access Token, if not the button will be greyed out like what is shown in the screenshot above.