Why can't I get the right facebook permissions in my game?

I’m testing out the Facebook SDK to implement it into my game.
I have to take a screenshot and upload it to the user profile. I’m using the Interactive Console example that comes with the SDK to figure out how to do it.
The problem is that the TakeScreenshot function doesn’t work in the example.
It returns the following error:

{"error":{"message":"(#200) Permissions error","type":"OAuthException","code":200}}

I was messing arround with it and I learned that I need to give permissions to the app, using the FB.Login function, like this:

FB.Login("email,publish_actions,user_photos", LoginCallback);

But when I use the FB.API function to learn what my permissions are, it returns this:

{"data":[{"permission":"public_profile","status":"granted"},{"permission":"user_friends","status":"granted"}]}

So, it seems I don’t have the publish_actions neither user_photos permissions.

What I am doing wrong here?

1 Answer

1

Facebook must explicitly approve the publish_actions permission. Have you submitted your app through their formal approval process?

What do you mean by that? I'm just testing out for now, I haven't submited my game to facebook yet. What I have done is set the App ID acording to the new app I created on developers.facebook.com . Also, when I log in, it asks for an access token, that is generated by facebook.

The default access token that clicking 'Get Token' only has the permissions authorised by Facebook. You can get around this by manually generating a token. You can do this from the open graph explorer. Let me know if you have further troubles and I will post a detailed set of instructions. Not on my development computer at the moment.

Hey does this mean, I'll be only able to test this after it is approved from facebook till then i have to generate token and test.

Facebook also let's you create test users. They can get full permissions without approval. As can the developer.